From f2d9ef772084a155bd396eb04ab306ebbc061e49 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 14 May 2013 14:40:41 -0700 Subject: [PATCH] Test: - CPPasteboard setString:forType: and stringForType:. --- Tests/AppKit/CPPasteboardTest.j | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Tests/AppKit/CPPasteboardTest.j diff --git a/Tests/AppKit/CPPasteboardTest.j b/Tests/AppKit/CPPasteboardTest.j new file mode 100644 index 000000000..eca98ee14 --- /dev/null +++ b/Tests/AppKit/CPPasteboardTest.j @@ -0,0 +1,17 @@ +@import + +@import + +@implementation CPPasteboardTest : OJTestCase +{ +} + +- (void)testSetString_forType_ +{ + var pboard = [CPPasteboard generalPasteboard]; + [pboard declareTypes:@[CPStringPboardType] owner:nil]; + [pboard setString:@"hello" forType:CPStringPboardType]; + [self assert:@"hello" equals:[pboard stringForType:CPStringPboardType]]; +} + +@end