Revision: 2619
http://oorexx.svn.sourceforge.net/oorexx/?rev=2619&view=rev
Author: miesfeld
Date: 2008-06-29 21:29:35 -0700 (Sun, 29 Jun 2008)
Log Message:
-----------
ooRexxUnit - Update the 'test_07copyPaste' test case in the Clipboard test
group. The test case did a copy/paste back to back and sometimes no text
was returned for the past operation. I believe this was a timing issue and
added a call to ~isDataAvailable() after the copy operation. This is a
perfectly valid thing to do and a robust application would always check that
data was actually available before a paste to begin with. The purpose of the
test case was to assert that data was put on the clipboard, that the date could
be pulled off the clipboard, and that the retrieved data matched the data
originally put on the clipboard. This commit does not change that purpose.
Modified Paths:
--------------
test/trunk/ooRexx/extensions/platform/windows/rxwinsys/Clipboard.testGroup
Modified: test/trunk/ooRexx/extensions/platform/windows/rxwinsys/Clipboard.testGroup
===================================================================
--- test/trunk/ooRexx/extensions/platform/windows/rxwinsys/Clipboard.testGroup 2008-06-30 02:48:03 UTC (rev 2618)
+++ test/trunk/ooRexx/extensions/platform/windows/rxwinsys/Clipboard.testGroup 2008-06-30 04:29:35 UTC (rev 2619)
@@ -111,6 +111,7 @@
.local~cp = .WindowsClipBoard~new
expected = 'a WindowsClipboard'
self~assertEquals(expected, .cp)
+ self~assertTrue(.cp~isA(.WindowsClipBoard))
::method 'test_02empty'
expected = 0
@@ -144,8 +145,20 @@
cb1 = .WindowsClipboard~new
cb2 = .WindowsClipboard~new
+ self~assertTrue(cb1~isA(.WindowsClipBoard))
+ self~assertTrue(cb2~isA(.WindowsClipBoard))
+
+ -- Place text on the clipboard.
cb1~copy("This is only a test")
+
+ -- Assert that data is available
+ self~assertTrue(cb1~isDataAvailable)
+ self~assertTrue(cb2~isDataAvailable)
+
+ -- Pull the data off the clipboard...
text = cb2~paste
+
+ -- ... and assert that it is the same as what was put on their.
self~assertEquals("This is only a test", text, 'Text retrieved from clipboard should equal text put on clipboard')
::method 'test_08cleanUp'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.