RegressionTests__UninterpretedBytesTest.st
branchjv
changeset 1500 d406a10b2965
parent 1499 26a16a04219b
parent 1447 2351db93aa5b
child 1567 e17701a073f9
--- a/RegressionTests__UninterpretedBytesTest.st	Wed Jun 29 21:40:53 2016 +0100
+++ b/RegressionTests__UninterpretedBytesTest.st	Thu Jun 30 09:02:08 2016 +0100
@@ -67,38 +67,38 @@
 
     "/ check immutablility checks
     bytes :=  #[ 16rFF 16r00 ] beImmutable.
-    self 
-        should:[        
-            bytes byteAt:1 put:0
-        ]
-        raise:NoModificationError.
+    self
+	should:[
+	    bytes byteAt:1 put:0
+	]
+	raise:NoModificationError.
     self assert:(bytes at:1) == 16rFF.
 
     "/ check bounds checks
     #(3 0 -1 -2) do:[:badIndex |
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] byteAt:badIndex
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] byteAt:badIndex
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] signedByteAt:badIndex
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] signedByteAt:badIndex
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] byteAt:badIndex put:0
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] byteAt:badIndex put:0
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] signedByteAt:badIndex put:0
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] signedByteAt:badIndex put:0
+	    ]
+	    raise:SubscriptOutOfBoundsError.
     ]
 
     "
@@ -109,106 +109,106 @@
 test01_int16Access
     |check bytes|
 
-    check := 
-        [:bytes1 :bytes2 |
-            |wBytes|
+    check :=
+	[:bytes1 :bytes2 |
+	    |wBytes|
 
-            "/ bytes1 := #[ 16r10 16r20 16r30 16r40 ].
-            self assert:(bytes1 unsignedInt16At:1 MSB:true)  = 16r1020.
-            self assert:(bytes1 unsignedInt16At:1 MSB:false) = 16r2010.
-            self assert:(bytes1 unsignedInt16At:2 MSB:true)  = 16r2030.
-            self assert:(bytes1 unsignedInt16At:2 MSB:false) = 16r3020.
-            self assert:(bytes1 unsignedInt16At:3 MSB:true)  = 16r3040.
-            self assert:(bytes1 unsignedInt16At:3 MSB:false) = 16r4030.
+	    "/ bytes1 := #[ 16r10 16r20 16r30 16r40 ].
+	    self assert:(bytes1 unsignedInt16At:1 MSB:true)  = 16r1020.
+	    self assert:(bytes1 unsignedInt16At:1 MSB:false) = 16r2010.
+	    self assert:(bytes1 unsignedInt16At:2 MSB:true)  = 16r2030.
+	    self assert:(bytes1 unsignedInt16At:2 MSB:false) = 16r3020.
+	    self assert:(bytes1 unsignedInt16At:3 MSB:true)  = 16r3040.
+	    self assert:(bytes1 unsignedInt16At:3 MSB:false) = 16r4030.
 
-            self assert:(bytes1 signedInt16At:1 MSB:true)  = 16r1020.
-            self assert:(bytes1 signedInt16At:1 MSB:false) = 16r2010.
-            self assert:(bytes1 signedInt16At:2 MSB:true)  = 16r2030.
-            self assert:(bytes1 signedInt16At:2 MSB:false) = 16r3020.
-            self assert:(bytes1 signedInt16At:3 MSB:true)  = 16r3040.
-            self assert:(bytes1 signedInt16At:3 MSB:false) = 16r4030.
+	    self assert:(bytes1 signedInt16At:1 MSB:true)  = 16r1020.
+	    self assert:(bytes1 signedInt16At:1 MSB:false) = 16r2010.
+	    self assert:(bytes1 signedInt16At:2 MSB:true)  = 16r2030.
+	    self assert:(bytes1 signedInt16At:2 MSB:false) = 16r3020.
+	    self assert:(bytes1 signedInt16At:3 MSB:true)  = 16r3040.
+	    self assert:(bytes1 signedInt16At:3 MSB:false) = 16r4030.
 
-            "/ bytes2 := #[ 16rFF 16r7F 16r80 16r81 ].
-            self assert:(bytes2 unsignedInt16At:1 MSB:true)  = 16rFF7F.
-            self assert:(bytes2 unsignedInt16At:1 MSB:false) = 16r7FFF.
-            self assert:(bytes2 unsignedInt16At:2 MSB:true)  = 16r7F80.
-            self assert:(bytes2 unsignedInt16At:2 MSB:false) = 16r807F.
-            self assert:(bytes2 unsignedInt16At:3 MSB:true)  = 16r8081.
-            self assert:(bytes2 unsignedInt16At:3 MSB:false) = 16r8180.
+	    "/ bytes2 := #[ 16rFF 16r7F 16r80 16r81 ].
+	    self assert:(bytes2 unsignedInt16At:1 MSB:true)  = 16rFF7F.
+	    self assert:(bytes2 unsignedInt16At:1 MSB:false) = 16r7FFF.
+	    self assert:(bytes2 unsignedInt16At:2 MSB:true)  = 16r7F80.
+	    self assert:(bytes2 unsignedInt16At:2 MSB:false) = 16r807F.
+	    self assert:(bytes2 unsignedInt16At:3 MSB:true)  = 16r8081.
+	    self assert:(bytes2 unsignedInt16At:3 MSB:false) = 16r8180.
 
-            self assert:(bytes2 signedInt16At:1 MSB:true)  = -129.  "/ 16rFF7F signExtendedShortValue
-            self assert:(bytes2 signedInt16At:1 MSB:false) = 16r7FFF.
-            self assert:(bytes2 signedInt16At:2 MSB:true)  = 16r7F80.
-            self assert:(bytes2 signedInt16At:2 MSB:false) = -32641. "/ 16r807F signExtendedShortValue.
-            self assert:(bytes2 signedInt16At:3 MSB:true)  = -32639. "/ 16r8081 signExtendedShortValue.
-            self assert:(bytes2 signedInt16At:3 MSB:false) = -32384. "/ 16r8180 signExtendedShortValue.
+	    self assert:(bytes2 signedInt16At:1 MSB:true)  = -129.  "/ 16rFF7F signExtendedShortValue
+	    self assert:(bytes2 signedInt16At:1 MSB:false) = 16r7FFF.
+	    self assert:(bytes2 signedInt16At:2 MSB:true)  = 16r7F80.
+	    self assert:(bytes2 signedInt16At:2 MSB:false) = -32641. "/ 16r807F signExtendedShortValue.
+	    self assert:(bytes2 signedInt16At:3 MSB:true)  = -32639. "/ 16r8081 signExtendedShortValue.
+	    self assert:(bytes2 signedInt16At:3 MSB:false) = -32384. "/ 16r8180 signExtendedShortValue.
 
-            wBytes := bytes2 copy.
+	    wBytes := bytes2 copy.
 
-            wBytes unsignedInt16At:1 put:16r1020 MSB:false.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r1020.
-            self assert:(wBytes signedInt16At:1 MSB:false) = 16r1020.
+	    wBytes unsignedInt16At:1 put:16r1020 MSB:false.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r1020.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = 16r1020.
 
-            wBytes unsignedInt16At:1 put:16r1020 MSB:true.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r2010.
-            self assert:(wBytes signedInt16At:1 MSB:false) = 16r2010.
+	    wBytes unsignedInt16At:1 put:16r1020 MSB:true.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r2010.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = 16r2010.
 
-            wBytes unsignedInt16At:1 put:16rFFFE MSB:false.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFFFE.
-            self assert:(wBytes signedInt16At:1 MSB:false) = -2.
+	    wBytes unsignedInt16At:1 put:16rFFFE MSB:false.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFFFE.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = -2.
 
-            wBytes unsignedInt16At:1 put:16rFFFE MSB:true.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFEFF.
-            self assert:(wBytes signedInt16At:1 MSB:false) = -257.  "/ 16rFEFF signExtendedShortValue
+	    wBytes unsignedInt16At:1 put:16rFFFE MSB:true.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFEFF.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = -257.  "/ 16rFEFF signExtendedShortValue
 
-            wBytes signedInt16At:1 put:16r1020 MSB:false.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r1020.
-            self assert:(wBytes signedInt16At:1 MSB:false) = 16r1020.
+	    wBytes signedInt16At:1 put:16r1020 MSB:false.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r1020.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = 16r1020.
 
-            wBytes signedInt16At:1 put:16r1020 MSB:true.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r2010.
-            self assert:(wBytes signedInt16At:1 MSB:false) = 16r2010.
+	    wBytes signedInt16At:1 put:16r1020 MSB:true.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16r2010.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = 16r2010.
 
-            wBytes signedInt16At:1 put:-3 MSB:false.
-            self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFFFD.
-            self assert:(wBytes signedInt16At:1 MSB:false) = -3.
-        ].
+	    wBytes signedInt16At:1 put:-3 MSB:false.
+	    self assert:(wBytes unsignedInt16At:1 MSB:false) = 16rFFFD.
+	    self assert:(wBytes signedInt16At:1 MSB:false) = -3.
+	].
 
-    check 
-        value: #[ 16r10 16r20 16r30 16r40 ]
-        value: #[ 16rFF 16r7F 16r80 16r81 ].
+    check
+	value: #[ 16r10 16r20 16r30 16r40 ]
+	value: #[ 16rFF 16r7F 16r80 16r81 ].
 
-    check 
-        value: (WordArray with:16r2010 with:16r4030)
-        value: (WordArray with:16r7FFF with:16r8180).
+    check
+	value: (WordArray with:16r2010 with:16r4030)
+	value: (WordArray with:16r7FFF with:16r8180).
 
-    check 
-        value: (IntegerArray with:16r40302010)
-        value: (IntegerArray with:16r81807FFF).
+    check
+	value: (IntegerArray with:16r40302010)
+	value: (IntegerArray with:16r81807FFF).
 
     "/ check immutablility checks
     bytes :=  #[ 1 2 ] beImmutable.
-    self 
-        should:[        
-            bytes unsignedInt16At:1 put:0
-        ]
-        raise:NoModificationError.
+    self
+	should:[
+	    bytes unsignedInt16At:1 put:0
+	]
+	raise:NoModificationError.
     self assert:(bytes at:1) == 1.
     self assert:(bytes at:2) == 2.
 
     "/ check bounds checks
     #(2 0 -1 -2) do:[:badIndex |
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] unsignedInt16At:badIndex MSB:true
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] unsignedInt16At:badIndex MSB:true
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r00 ] unsignedInt16At:badIndex MSB:false
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r00 ] unsignedInt16At:badIndex MSB:false
+	    ]
+	    raise:SubscriptOutOfBoundsError.
     ]
 
     "
@@ -272,11 +272,11 @@
 
     "/ check immutablility checks
     bytes :=  #[ 1 2 3 4 ] beImmutable.
-    self 
-        should:[        
-            bytes unsignedInt32At:1 put:0
-        ]
-        raise:NoModificationError.
+    self
+	should:[
+	    bytes unsignedInt32At:1 put:0
+	]
+	raise:NoModificationError.
     self assert:(bytes at:1) == 1.
     self assert:(bytes at:2) == 2.
     self assert:(bytes at:3) == 3.
@@ -284,17 +284,17 @@
 
     "/ check bounds checks
     #(2 0 -1 -2) do:[:badIndex |
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 ] unsignedInt32At:badIndex MSB:true
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 ] unsignedInt32At:badIndex MSB:true
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 ] unsignedInt32At:badIndex MSB:false
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 ] unsignedInt32At:badIndex MSB:false
+	    ]
+	    raise:SubscriptOutOfBoundsError.
     ]
 
     "
@@ -340,11 +340,11 @@
 
     "/ check immutablility checks
     bytes :=  #[ 1 2 3 4 5 6 7 8 ] beImmutable.
-    self 
-        should:[        
-            bytes unsignedInt64At:1 put:0
-        ]
-        raise:NoModificationError.
+    self
+	should:[
+	    bytes unsignedInt64At:1 put:0
+	]
+	raise:NoModificationError.
     self assert:(bytes at:1) == 1.
     self assert:(bytes at:2) == 2.
     self assert:(bytes at:3) == 3.
@@ -356,17 +356,17 @@
 
     "/ check bounds checks
     #(2 0 -1 -2) do:[:badIndex |
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 16r04 16r05 16r06 16r07 ] unsignedInt64At:badIndex MSB:true
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 16r04 16r05 16r06 16r07 ] unsignedInt64At:badIndex MSB:true
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 16r04 16r05 16r06 16r07 ] unsignedInt64At:badIndex MSB:false
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 16r04 16r05 16r06 16r07 ] unsignedInt64At:badIndex MSB:false
+	    ]
+	    raise:SubscriptOutOfBoundsError.
     ]
 
     "
@@ -400,29 +400,29 @@
 
     "/ check bounds checks
     #(2 0 -1 -2) do:[:badIndex |
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 ] floatAt:badIndex MSB:true
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 ] floatAt:badIndex MSB:true
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 ] floatAt:badIndex MSB:false
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 ] floatAt:badIndex MSB:false
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 16rFF 16r01 16r02 16r03 ] doubleAt:badIndex MSB:true
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 16rFF 16r01 16r02 16r03 ] doubleAt:badIndex MSB:true
+	    ]
+	    raise:SubscriptOutOfBoundsError.
 
-        self 
-            should:[        
-                #[ 16rFF 16r01 16r02 16r03 16rFF 16r01 16r02 16r03 ] doubleAt:badIndex MSB:false
-            ]
-            raise:SubscriptOutOfBoundsError.
+	self
+	    should:[
+		#[ 16rFF 16r01 16r02 16r03 16rFF 16r01 16r02 16r03 ] doubleAt:badIndex MSB:false
+	    ]
+	    raise:SubscriptOutOfBoundsError.
     ]
 
     "