--- a/RegressionTests__FloatTest.st Mon Jul 03 10:14:41 2017 +0200
+++ b/RegressionTests__FloatTest.st Mon Jul 03 13:58:38 2017 +0200
@@ -850,6 +850,28 @@
"
"Modified: / 02-08-2011 / 18:34:39 / cg"
+!
+
+test09_ComplexRoots
+ |rslt|
+
+ self should:[ -4 sqrt ] raise:ImaginaryResultError.
+
+ rslt := Complex trapImaginary:[ -4 sqrt ].
+ self assert:(rslt = 2 i).
+
+ rslt := nil.
+ Complex trapImaginary:[ rslt := -4 sqrt ].
+ self assert:(rslt = 2 i).
+
+ self shouldnt:[ rslt := -8 cbrt ] raise:ImaginaryResultError.
+ self assert:(rslt = -2).
+
+ "
+ self basicNew test09_ComplexRoots
+ "
+
+ "Created: / 03-07-2017 / 13:51:54 / cg"
! !
!FloatTest class methodsFor:'documentation'!