aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/integtests/platform/OSXClipboardTests.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /src/test/integtests/platform/OSXClipboardTests.cpp
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/test/integtests/platform/OSXClipboardTests.cpp')
-rw-r--r--src/test/integtests/platform/OSXClipboardTests.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/test/integtests/platform/OSXClipboardTests.cpp b/src/test/integtests/platform/OSXClipboardTests.cpp
index 45b73bd..093c738 100644
--- a/src/test/integtests/platform/OSXClipboardTests.cpp
+++ b/src/test/integtests/platform/OSXClipboardTests.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2011 Nick Bolton
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -25,9 +25,9 @@ TEST(OSXClipboardTests, empty_openCalled_returnsTrue)
{
OSXClipboard clipboard;
clipboard.open(0);
-
+
bool actual = clipboard.empty();
-
+
EXPECT_EQ(true, actual);
}
@@ -36,9 +36,9 @@ TEST(OSXClipboardTests, empty_singleFormat_hasReturnsFalse)
OSXClipboard clipboard;
clipboard.open(0);
clipboard.add(OSXClipboard::kText, "barrier rocks!");
-
+
clipboard.empty();
-
+
bool actual = clipboard.has(OSXClipboard::kText);
EXPECT_EQ(false, actual);
}
@@ -47,9 +47,9 @@ TEST(OSXClipboardTests, add_newValue_valueWasStored)
{
OSXClipboard clipboard;
clipboard.open(0);
-
+
clipboard.add(IClipboard::kText, "barrier rocks!");
-
+
String actual = clipboard.get(IClipboard::kText);
EXPECT_EQ("barrier rocks!", actual);
}
@@ -58,10 +58,10 @@ TEST(OSXClipboardTests, add_replaceValue_valueWasReplaced)
{
OSXClipboard clipboard;
clipboard.open(0);
-
+
clipboard.add(IClipboard::kText, "barrier rocks!");
clipboard.add(IClipboard::kText, "maxivista sucks"); // haha, just kidding.
-
+
String actual = clipboard.get(IClipboard::kText);
EXPECT_EQ("maxivista sucks", actual);
}
@@ -69,18 +69,18 @@ TEST(OSXClipboardTests, add_replaceValue_valueWasReplaced)
TEST(OSXClipboardTests, open_timeIsZero_returnsTrue)
{
OSXClipboard clipboard;
-
+
bool actual = clipboard.open(0);
-
+
EXPECT_EQ(true, actual);
}
TEST(OSXClipboardTests, open_timeIsOne_returnsTrue)
{
OSXClipboard clipboard;
-
+
bool actual = clipboard.open(1);
-
+
EXPECT_EQ(true, actual);
}
@@ -88,9 +88,9 @@ TEST(OSXClipboardTests, close_isOpen_noErrors)
{
OSXClipboard clipboard;
clipboard.open(0);
-
+
clipboard.close();
-
+
// can't assert anything
}
@@ -98,9 +98,9 @@ TEST(OSXClipboardTests, getTime_openWithNoEmpty_returnsOne)
{
OSXClipboard clipboard;
clipboard.open(1);
-
+
OSXClipboard::Time actual = clipboard.getTime();
-
+
// this behavior is different to that of Clipboard which only
// returns the value passed into open(t) after empty() is called.
EXPECT_EQ((UInt32)1, actual);
@@ -111,9 +111,9 @@ TEST(OSXClipboardTests, getTime_openAndEmpty_returnsOne)
OSXClipboard clipboard;
clipboard.open(1);
clipboard.empty();
-
+
OSXClipboard::Time actual = clipboard.getTime();
-
+
EXPECT_EQ((UInt32)1, actual);
}
@@ -123,9 +123,9 @@ TEST(OSXClipboardTests, has_withFormatAdded_returnsTrue)
clipboard.open(0);
clipboard.empty();
clipboard.add(IClipboard::kText, "barrier rocks!");
-
+
bool actual = clipboard.has(IClipboard::kText);
-
+
EXPECT_EQ(true, actual);
}
@@ -134,9 +134,9 @@ TEST(OSXClipboardTests, has_withNoFormats_returnsFalse)
OSXClipboard clipboard;
clipboard.open(0);
clipboard.empty();
-
+
bool actual = clipboard.has(IClipboard::kText);
-
+
EXPECT_EQ(false, actual);
}
@@ -145,9 +145,9 @@ TEST(OSXClipboardTests, get_withNoFormats_returnsEmpty)
OSXClipboard clipboard;
clipboard.open(0);
clipboard.empty();
-
+
String actual = clipboard.get(IClipboard::kText);
-
+
EXPECT_EQ("", actual);
}
@@ -157,8 +157,8 @@ TEST(OSXClipboardTests, get_withFormatAdded_returnsExpected)
clipboard.open(0);
clipboard.empty();
clipboard.add(IClipboard::kText, "barrier rocks!");
-
+
String actual = clipboard.get(IClipboard::kText);
-
+
EXPECT_EQ("barrier rocks!", actual);
}