RegressionTests__TimeDurationTest.st
changeset 1925 8aae0cf16be3
parent 1923 00f3085c5b71
child 1926 139e97e95b07
--- a/RegressionTests__TimeDurationTest.st	Thu May 10 23:55:38 2018 +0200
+++ b/RegressionTests__TimeDurationTest.st	Thu May 10 23:55:50 2018 +0200
@@ -466,6 +466,30 @@
     "
 
     "Created: / 18-07-2007 / 14:02:01 / cg"
+!
+
+test_11_Comparing
+    |t1 t2|
+
+    t1 := TimeDuration fromSeconds:1.
+    t2 := t1 + 1 picoseconds.
+    self assert:(t2 > t1).
+    self assert:(t2 >= t1).
+    self assert:(t2 = t1) not.
+    self assert:(t2 <= t1) not.
+    self assert:(t2 < t1) not.
+
+    t1 := TimeDuration fromSeconds:1.
+    t2 := t1 - 1 picoseconds.
+    self assert:(t2 < t1).
+    self assert:(t2 <= t1).
+    self assert:(t2 = t1) not.
+    self assert:(t2 >= t1) not.
+    self assert:(t2 > t1) not.
+
+    "
+     self new test_11_Comparing
+    "
 ! !
 
 !TimeDurationTest class methodsFor:'documentation'!