#QUALITY by cg
class: RegressionTests::JavaScriptTests
added:
#testOperators02b_plusString
#testOperators04b_plusString
#testOperators29b_plusAssignString
--- a/RegressionTests__JavaScriptTests.st Mon Apr 23 22:18:46 2018 +0200
+++ b/RegressionTests__JavaScriptTests.st Tue Apr 24 07:34:00 2018 +0200
@@ -1762,6 +1762,21 @@
"
!
+testOperators02b_plusString
+ self
+ execute:'expr(a, b) {
+ return (a + "world");
+ }'
+ for:nil
+ arguments:#('hello' 'world')
+ expect:'helloworld'
+
+ "
+ self run:#testOperators02b_plusString
+ self new testOperators02b_plusString
+ "
+!
+
testOperators03_minus
self
execute:'expr(a, b) {
@@ -1792,6 +1807,21 @@
"
!
+testOperators04b_plusString
+ self
+ execute:'expr(a, b) {
+ return (a + a);
+ }'
+ for:nil
+ arguments:#('abc' 'abc')
+ expect:'abcabc'
+
+ "
+ self run:#testOperators04b_plusString
+ self new testOperators04b_plusString
+ "
+!
+
testOperators05_mul
self
execute:'expr(a, b) {
@@ -2743,6 +2773,26 @@
"
!
+testOperators29b_plusAssignString
+ self
+ execute:'expr(a, b, c, d) {
+ var s = "hello";
+ s += a;
+ s += b;
+ s += c;
+ s += d;
+ return (s);
+ }'
+ for:nil
+ arguments:#( 'w' 'o' 'r' 'ld')
+ expect:'helloworld'
+
+ "
+ self run:#testOperators29b_plusAssignString
+ self new testOperators29b_plusAssignString
+ "
+!
+
testOperators29c_minusAssign
self
execute:'expr(a, b, c, d) {