|
@@ -154,7 +154,7 @@ TestCase subclass: #NumberTest
|
|
instanceVariableNames: ''
|
|
instanceVariableNames: ''
|
|
category: 'Kernel-Tests'!
|
|
category: 'Kernel-Tests'!
|
|
|
|
|
|
-!NumberTest methodsFor: 'not yet classified'!
|
|
|
|
|
|
+!NumberTest methodsFor: 'tests'!
|
|
|
|
|
|
testPrintShowingDecimalPlaces
|
|
testPrintShowingDecimalPlaces
|
|
self assert: '23.00' equals: (23 printShowingDecimalPlaces: 2).
|
|
self assert: '23.00' equals: (23 printShowingDecimalPlaces: 2).
|
|
@@ -170,9 +170,7 @@ testPrintShowingDecimalPlaces
|
|
self assert: '2.57' equals: (2.567 printShowingDecimalPlaces: 2).
|
|
self assert: '2.57' equals: (2.567 printShowingDecimalPlaces: 2).
|
|
self assert: '-2.57' equals: (-2.567 printShowingDecimalPlaces: 2).
|
|
self assert: '-2.57' equals: (-2.567 printShowingDecimalPlaces: 2).
|
|
self assert: '0.00' equals: (0 printShowingDecimalPlaces: 2).
|
|
self assert: '0.00' equals: (0 printShowingDecimalPlaces: 2).
|
|
-! !
|
|
|
|
-
|
|
|
|
-!NumberTest methodsFor: 'tests'!
|
|
|
|
|
|
+!
|
|
|
|
|
|
testEquality
|
|
testEquality
|
|
self assert: 1 = 1.
|
|
self assert: 1 = 1.
|
|
@@ -237,6 +235,11 @@ testTruncated
|
|
self assert: 3 truncated = 3.
|
|
self assert: 3 truncated = 3.
|
|
self assert: 3.212 truncated = 3.
|
|
self assert: 3.212 truncated = 3.
|
|
self assert: 3.51 truncated = 3
|
|
self assert: 3.51 truncated = 3
|
|
|
|
+!
|
|
|
|
+
|
|
|
|
+testCopying
|
|
|
|
+ self assert: 1 copy = 1.
|
|
|
|
+ self assert: 1 deepCopy = 1
|
|
! !
|
|
! !
|
|
|
|
|
|
TestCase subclass: #JSObjectProxyTest
|
|
TestCase subclass: #JSObjectProxyTest
|
|
@@ -273,5 +276,5 @@ testPropertyThatReturnsEmptyString
|
|
|
|
|
|
document location hash: 'test'.
|
|
document location hash: 'test'.
|
|
self assert: '#test' equals: document location hash.
|
|
self assert: '#test' equals: document location hash.
|
|
|
|
+! !
|
|
|
|
|
|
-! !
|
|
|