#QUALITY by cg
authorClaus Gittinger <cg@exept.de>
Tue, 02 Apr 2019 10:41:48 +0200
changeset 2207 33fec8c61cb8
parent 2206 827d17b7a941
child 2208 2d54a6ac9a73
#QUALITY by cg class: RegressionTests::StringTests changed: #test65_concatenation
RegressionTests__StringTests.st
--- a/RegressionTests__StringTests.st	Mon Apr 01 17:20:34 2019 +0200
+++ b/RegressionTests__StringTests.st	Tue Apr 02 10:41:48 2019 +0200
@@ -1078,22 +1078,22 @@
     |strA strB|
 
     0 to:32 do:[:szA |
-	0 to:32 do:[:szB |
-	    |szAB|
+        0 to:32 do:[:szB |
+            |szAB|
 
-	    strA := String new:szA withAll:$a.
-	    strB := String new:szB withAll:$b.
-	    szAB := szA + szB.
-	    self assert:(szA = strA size).
-	    self assert:(szB = strB size).
-	    10000 timesRepeat:[
-		|strAB|
+            strA := String new:szA withAll:$a.
+            strB := String new:szB withAll:$b.
+            szAB := szA + szB.
+            self assert:(szA = strA size).
+            self assert:(szB = strB size).
+            "/ why repeat ??? - to check GC???
+            1 "10000" timesRepeat:[
+                |strAB|
 
-		strAB := strA , strB.
-
-		self assert:(szAB == strAB size).
-	    ]
-	]
+                strAB := strA , strB.
+                self assert:(szAB == strAB size).
+            ]
+        ]
     ].
 
     strA := strB := ''.
@@ -1108,9 +1108,22 @@
     strA := 'b'.
     strB := 'a'.
     self assert: ((strB , strA) = 'ab').
+
+    "/ concatenating other things
+    self assert:('hello',123) = 'hello123'.
+    self assert:('hello' asUnicode16String,123) = 'hello123' asUnicode16String.
+    self assert:('hello' asUnicode32String,123) = 'hello123' asUnicode32String.
+    
+    "/ concatenating other things
+    self assert:('hello',,123) = c'hello\n123'.
+    self assert:('hello' asUnicode16String,,123) = c'hello\n123' asUnicode16String.
+    self assert:('hello' asUnicode32String,,123) = c'hello\n123' asUnicode32String.
+
     "
      self new test65_concatenation
     "
+
+    "Modified: / 02-04-2019 / 10:41:24 / Claus Gittinger"
 !
 
 test66_replace