--- a/RegressionTests__QuadFloatTest.st Fri Jun 07 03:40:23 2019 +0200
+++ b/RegressionTests__QuadFloatTest.st Fri Jun 07 03:41:22 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"{ Package: 'stx:goodies/regression' }"
"{ NameSpace: RegressionTests }"
@@ -60,6 +62,8 @@
|shouldBeQuadFloatNaN|
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
shouldBeQuadFloatNaN := 0.0 asQuadFloat uncheckedDivide: 0.0 asQuadFloat.
self assert:( shouldBeQuadFloatNaN isMemberOf:QuadFloat ).
self assert:( shouldBeQuadFloatNaN isNaN ).
@@ -85,7 +89,7 @@
"
"Modified: / 20-06-2017 / 14:00:08 / cg"
- "Modified (comment): / 07-06-2019 / 03:30:29 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:40:37 / Claus Gittinger"
!
test02_Inf
@@ -93,6 +97,8 @@
|check posInf negInf|
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
check :=
[:v1 :v2 |
@@ -160,10 +166,12 @@
"
"Modified: / 20-06-2017 / 14:03:08 / cg"
- "Modified: / 07-06-2019 / 03:31:20 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:40:41 / Claus Gittinger"
!
test03_Conversion
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
self assert:( 1.0 asQuadFloat asTrueFraction == 1 ).
self assert:( 2.0 asQuadFloat asTrueFraction == 2 ).
self assert:( 4.0 asQuadFloat asTrueFraction == 4 ).
@@ -192,10 +200,12 @@
"
"Modified: / 09-08-2011 / 21:01:57 / cg"
- "Modified: / 07-06-2019 / 03:32:20 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:40:45 / Claus Gittinger"
!
test04_Arithmetic
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
self assert:( 1.0 + 1.0 asQuadFloat) class == QuadFloat.
self assert:( 1.0 asQuadFloat + 1.0 ) class == QuadFloat.
@@ -246,12 +256,14 @@
self basicNew test04_Arithmetic
"
- "Modified: / 07-06-2019 / 03:34:38 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:40:50 / Claus Gittinger"
!
test05_Comparing
|convArray check v1 v2 v1b|
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
convArray := OrderedCollection new.
convArray addAll:#(yourself asInteger asFloat asShortFloat asLongFloat).
@@ -348,12 +360,14 @@
self basicNew test05_Comparing
"
- "Modified: / 07-06-2019 / 03:35:24 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:40:55 / Claus Gittinger"
!
test06_MiscMath
|epsilon|
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
epsilon := 0.000001.
#(
@@ -510,12 +524,14 @@
"
"Modified: / 02-07-2017 / 00:51:05 / cg"
- "Modified: / 07-06-2019 / 03:36:48 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:41:02 / Claus Gittinger"
!
test07_Truncation
|check|
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
check := [:num |
self assert:( num fractionPart + num truncated ) = num.
self assert:( num fractionPart + num truncated ) class == num class.
@@ -578,10 +594,13 @@
self basicNew test07_Truncation
"
- "Modified: / 07-06-2019 / 03:38:52 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:41:08 / Claus Gittinger"
!
test08_Representation
+ self skipIf:(ExternalAddress pointerSize == 4) description:'only suported on 64bit machines'.
+
+
self assert: (QuadFloat unity class == QuadFloat).
self assert: (QuadFloat unity = 1.0).
@@ -608,7 +627,7 @@
"
"Modified: / 02-08-2011 / 18:34:39 / cg"
- "Modified: / 07-06-2019 / 03:39:45 / Claus Gittinger"
+ "Modified: / 07-06-2019 / 03:41:13 / Claus Gittinger"
! !
!QuadFloatTest class methodsFor:'documentation'!