"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
TestCase subclass:#NumberTest
instanceVariableNames:'a b'
classVariableNames:''
poolDictionaries:''
category:'tests-Regression'
!
!NumberTest methodsFor:'accessing'!
a
^ a
!
a:something
a := something.
!
b
^ b
!
b:something
b := something.
! !
!NumberTest methodsFor:'tests - concrete bugs'!
test_eqNumberBug
"reported 09-09-2004;
stc generated wrong code for some inlined = - compare (shame)."
Class withoutUpdatingChangesDo:[
self class
compile:
'testEQ
a = b ifTrue:[^ false].
^ true.
'
classified:'temporary'.
].
self assert: (
(self
a:0;
b:0) testEQ ) == false.
self assert: (
(self
a:0;
b:0.0) testEQ ) == false.
self assert: (
(self
a:0.0;
b:0) testEQ ) == false.
self assert: (
(self
a:0.0;
b:0.0) testEQ ) == false.
Class withoutUpdatingChangesDo:[
Compiler
stcCompileMethod:(self class compiledMethodAt:#testEQ).
].
self assert: (
(self
a:0;
b:0) testEQ ) == false.
self assert: (
(self
a:0;
b:0.0) testEQ ) == false.
self assert: (
(self
a:0.0;
b:0) testEQ ) == false.
self assert: (
(self
a:0.0;
b:0.0) testEQ ) == false.
Class withoutUpdatingChangesDo:[
self class removeSelector:#testEQ
].
"
self new test_eqNumberBug
"
! !
!NumberTest class methodsFor:'documentation'!
version
^ '$Header$'
! !