Diff of /test/trunk/ooRexx/base/class/CircularQueue.testGroup [r8464] .. [r8465] Maximize Restore

  Switch to side-by-side view

--- a/test/trunk/ooRexx/base/class/CircularQueue.testGroup
+++ b/test/trunk/ooRexx/base/class/CircularQueue.testGroup
@@ -1,7 +1,7 @@
 #!/usr/bin/rexx
 /*
-  SVN Revision: $Rev: 8260 $
-  Change Date:  $Date: 2012-08-25 18:08:37 +0000 (Sat, 25 Aug 2012) $
+  SVN Revision: $Rev: 8465 $
+  Change Date:  $Date: 2012-10-02 23:08:45 +0000 (Tue, 02 Oct 2012) $
 */
 /*----------------------------------------------------------------------------*/
 /*                                                                            */
@@ -405,3 +405,43 @@
   self~assertEquals(2, a~next(1))
   self~assertEquals(1, a~previous(2))
 
+
+::method "test_append"
+
+  a = .circularqueue~new(3)
+
+  self~assertEquals(1, a~append(1))
+  self~assertEquals(3, a~size)
+  self~assertEquals(1, a~items)
+  self~assertSame(1, a~firstitem)
+  self~assertSame(1, a~lastitem)
+
+  self~assertEquals(2, a~append(2))
+  self~assertEquals(3, a~size)
+  self~assertEquals(2, a~items)
+  self~assertSame(1, a~firstitem)
+  self~assertSame(2, a~lastitem)
+
+  self~assertEquals(3, a~append(3))
+  self~assertEquals(3, a~size)
+  self~assertEquals(3, a~items)
+  self~assertSame(1, a~firstitem)
+  self~assertSame(3, a~lastitem)
+
+  self~assertEquals(3, a~append(4))
+  self~assertEquals(3, a~size)
+  self~assertEquals(3, a~items)
+  self~assertSame(2, a~firstitem)
+  self~assertSame(4, a~lastitem)
+
+  a~appendAll(.array~of(5, 6))
+  self~assertEquals(3, a~size)
+  self~assertEquals(3, a~items)
+  self~assertSame(4, a~firstitem)
+  self~assertSame(6, a~lastitem)
+
+  a~appendAll(.array~of(7, 8, 9, 10))
+  self~assertEquals(3, a~size)
+  self~assertEquals(3, a~items)
+  self~assertSame(8, a~firstitem)
+  self~assertSame(10, a~lastitem)