RegressionTests__UninterpretedBytesTest.st
changeset 1574 2f79d32744c0
parent 1447 2351db93aa5b
--- a/RegressionTests__UninterpretedBytesTest.st	Tue Feb 07 04:42:03 2017 +0000
+++ b/RegressionTests__UninterpretedBytesTest.st	Thu Feb 16 20:13:29 2017 +0100
@@ -23,7 +23,7 @@
 test00_byteAccess
     |bytes|
 
-    bytes := #[ 16r10 16r20 16r30 16r40 ].
+    bytes := #[ 16r10 16r20 16r30 16r40 ] copy.
 
     self assert:(bytes byteAt:1) == 16r10.
     self assert:(bytes byteAt:2) == 16r20.
@@ -35,7 +35,7 @@
     self assert:(bytes signedByteAt:3) == 16r30.
     self assert:(bytes signedByteAt:4) == 16r40.
 
-    bytes := #[ 16rFF 16r7F 16r80 16r81 ].
+    bytes := #[ 16rFF 16r7F 16r80 16r81 ] copy.
 
     self assert:(bytes byteAt:1) == 16rFF.
     self assert:(bytes byteAt:2) == 16r7F.
@@ -68,42 +68,44 @@
     "/ check immutablility checks
     bytes :=  #[ 16rFF 16r00 ] beImmutable.
     self
-	should:[
-	    bytes byteAt:1 put:0
-	]
-	raise:NoModificationError.
+        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 ] copy byteAt:badIndex put:0
+            ]
+            raise:SubscriptOutOfBoundsError.
 
-	self
-	    should:[
-		#[ 16rFF 16r00 ] signedByteAt:badIndex put:0
-	    ]
-	    raise:SubscriptOutOfBoundsError.
+        self
+            should:[
+                #[ 16rFF 16r00 ] copy signedByteAt:badIndex put:0
+            ]
+            raise:SubscriptOutOfBoundsError.
     ]
 
     "
      self run:#test00_byteAccess
     "
+
+    "Modified: / 16-02-2017 / 20:12:06 / stefan"
 !
 
 test01_int16Access