--- a/RegressionTests__XMLCoderTests.st Tue Oct 14 17:51:27 2003 +0200
+++ b/RegressionTests__XMLCoderTests.st Tue Oct 21 10:11:57 2003 +0200
@@ -3,10 +3,10 @@
"{ NameSpace: RegressionTests }"
TestCase subclass:#XMLCoderTests
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- category:'XML-Presentation'
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'XML-Presentation'
!
!XMLCoderTests class methodsFor:'documentation'!
@@ -16,7 +16,7 @@
documentation to be added.
[author:]
- Stefan Vogel (stefan@zwerg)
+ Stefan Vogel (stefan@zwerg)
[see also:]
@@ -169,7 +169,7 @@
"
!
- self encodeAndDecode:i
+testFloat
"test encoding an decoding of an integer"
-1.0 to: 1.0 by:0.5 do:[:i|
@@ -181,7 +181,7 @@
"
!
- self encodeAndDecode:i
+testFraction
"test encoding an decoding of an integer"
(-3/4) to:(3/4) by:(1/4) do:[:i|
@@ -210,7 +210,7 @@
"
!
-100 to: 100 do:[:i|
- self encodeAndDecode:i
+ self encodeAndDecode:i
-100 to: 100 do:[:i|
self encodeAndDecode:i
@@ -235,6 +235,51 @@
"
!
+testLargeInteger
+ "test encoding an decoding of an integer"
+
+ #(
+ 16r1FFFFFFF 16r20000000
+ 16r3FFFFFFF 16r40000000
+ 16r7FFFFFFF 16r80000000
+ 16rFFFFFFFF 16r100000000
+
+ 16r1FFFFFFFF 16r200000000
+ 16r3FFFFFFFF 16r400000000
+ 16r7FFFFFFFF 16r800000000
+ 16rFFFFFFFFF 16r1000000000
+
+ 16r1FFFFFFFFF 16r2000000000
+ 16r3FFFFFFFFF 16r4000000000
+ 16r7FFFFFFFFF 16r8000000000
+ 16rFFFFFFFFFF 16r10000000000
+
+ 16r1FFFFFFFFFF 16r20000000000
+ 16r3FFFFFFFFFF 16r40000000000
+ 16r7FFFFFFFFFF 16r80000000000
+ 16rFFFFFFFFFFF 16r100000000000
+
+ 16r1FFFFFFFFFFF 16r200000000000
+ 16r3FFFFFFFFFFF 16r400000000000
+ 16r7FFFFFFFFFFF 16r800000000000
+ 16rFFFFFFFFFFFF 16r1000000000000
+
+ 16r1FFFFFFFFFFFFFF 16r200000000000000
+ 16r3FFFFFFFFFFFFFF 16r400000000000000
+ 16r7FFFFFFFFFFFFFF 16r800000000000000
+ 16rFFFFFFFFFFFFFFF 16r1000000000000000
+
+ ) do:[:i|
+ self encodeAndDecode:i.
+ self encodeAndDecode:i negated.
+ ].
+
+ "
+ self run:#testLargeInteger
+ self basicNew testLargeInteger
+ "
+!
+
testOrderedCollection
"test encoding an decoding of an OrderedCollection"
@@ -252,6 +297,20 @@
"
!
+testPoint
+ "test encoding an decoding of a point"
+
+ -4 to:4 do:[:x |
+ -4 to:4 do:[:y |
+ self encodeAndDecode:(x @ y)
+ ]
+ ].
+
+ "
+ self run:#testPoint
+ "
+!
+
testSet
"test encoding an decoding of a set"
@@ -272,11 +331,11 @@
testString
"test encoding an decoding of a String"
- Character tab asString, Character tab asString, 'tabs',
- Character tab asString.
+ self encodeAndDecode:'hello world'.
+ self encodeAndDecode:'hello world üö#*ß'.
self encodeAndDecode:Character tab asString , 'with',
- Character tab asString, Character tab asString, 'tabs',
- Character tab asString.
+ Character tab asString, Character tab asString, 'tabs',
+ Character tab asString.
self encodeAndDecode:Character tab asString , '& with',
Character tab asString, Character tab asString, 'tabs',
Character tab asString.
@@ -296,7 +355,7 @@
"
! !
- ^ '$Header$'
+!XMLCoderTests class methodsFor:'documentation'!
version
^ '$Header$'