changed:
authorClaus Gittinger <cg@exept.de>
Wed, 06 Jul 2011 21:51:05 +0200
changeset 591 6b98736b928f
parent 590 a1fa0ad0b5bf
child 592 86f714dd5523
changed: #test02_adding #test03_removing
RegressionTests__BinaryTreeTester.st
--- a/RegressionTests__BinaryTreeTester.st	Wed Jul 06 21:43:01 2011 +0200
+++ b/RegressionTests__BinaryTreeTester.st	Wed Jul 06 21:51:05 2011 +0200
@@ -31,12 +31,6 @@
     "Created: / 9.12.2003 / 19:34:33 / cg"
 ! !
 
-!BinaryTreeTester class methodsFor:'others'!
-
-version_CVS
-    ^ '$Header$'
-! !
-
 !BinaryTreeTester class methodsFor:'queries'!
 
 coveredClassNames
@@ -107,10 +101,15 @@
 
     bt := BinaryTree new.
 
+    self assert: ( bt includes:1 ) not.
+    self assert: ( bt includesIdentical:1 ) not.
+
     bt add:1.
     self assert: ( bt size == 1 ).
     self assert: ( bt notEmpty ).
     self assert: ( bt asArray = #(1) ).
+    self assert: ( bt includes:1 ).
+    self assert: ( bt includesIdentical:1 ).
 
     bt add:2.
     self assert: ( bt size == 2 ).
@@ -128,17 +127,25 @@
      self run:#test02_adding
      self new test02_adding
     "
+
+    "Modified: / 06-07-2011 / 21:48:24 / cg"
 !
 
 test03_removing
     |bt|
 
     bt := BinaryTree new.
+    self should:[ bt remove:11111 ] raise:Error.
+    self should:[ bt removeIdentical:11111 ] raise:Error.
+
     bt addAll:#(1 2 3 4 5 6 7 8 9 10).
 
     self assert: ( bt size == 10 ).
     self assert: ( bt asArray = #(1 2 3 4 5 6 7 8 9 10) ).
 
+    self should:[ bt remove:11111 ] raise:Error.
+    self should:[ bt removeIdentical:11111 ] raise:Error.
+
     #(4 2 1 3 5 6) do:[:toRemove |
         |t|
 
@@ -159,6 +166,8 @@
      self run:#test03_removing
      self new test03_removing
     "
+
+    "Modified: / 06-07-2011 / 21:50:16 / cg"
 !
 
 test04_addingRemoving
@@ -194,6 +203,6 @@
 
 !BinaryTreeTester class methodsFor:'documentation'!
 
-version
+version_CVS
     ^ '$Header$'
 ! !