--- a/RegressionTests__JavaScriptTests.st Wed Jun 29 20:13:09 2016 +0100
+++ b/RegressionTests__JavaScriptTests.st Sat Nov 21 22:50:41 2015 +0000
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"{ Package: 'exept:regression' }"
"{ NameSpace: RegressionTests }"
@@ -119,7 +117,7 @@
"/ f decompileTo:Transcript.
- result := f valueWithReceiver:receiver arguments:arguments.
+ result := f valueWithReceiver:receiver arguments:arguments selector:nil search:nil sender:nil.
^ result
"Modified: / 09-10-2011 / 11:41:51 / cg"
@@ -3524,6 +3522,100 @@
"
!
+testOperators48_isArray
+ self
+ execute:'expr(arg) {
+ return arg.isArray() ;
+ }'
+ for:nil
+ arguments:#(123)
+ expect:false.
+
+ self
+ execute:'expr(arg) {
+ return arg.isArray() ;
+ }'
+ for:nil
+ arguments:#('hello')
+ expect:false.
+
+ self
+ execute:'expr(arg) {
+ return arg.isArray() ;
+ }'
+ for:nil
+ arguments:#( (1 2 3) )
+ expect:true.
+
+ "
+ self run:#testOperators48_isArray
+ self new testOperators48_isArray
+ "
+!
+
+testOperators49_concat
+ self
+ execute:'expr(arg1) {
+ return arg1.concat() ;
+ }'
+ for:nil
+ arguments:#( 'a')
+ expect:'a'.
+
+ self
+ execute:'expr(arg1, arg2) {
+ return arg1.concat(arg2) ;
+ }'
+ for:nil
+ arguments:#( 'a' 'b')
+ expect:'ab'.
+
+ self
+ execute:'expr(arg1, arg2, arg3) {
+ return arg1.concat(arg2, arg3) ;
+ }'
+ for:nil
+ arguments:#( 'a' 'b' 'c' )
+ expect:'abc'.
+
+ self
+ execute:'expr() {
+ return "a".concat("b", "c", "d", "e", "f") ;
+ }'
+ for:nil
+ arguments:nil
+ expect:'abcdef'.
+
+ self
+ execute:'expr() {
+ return "a".concat("b", "c", "d", "e", "f", "g") ;
+ }'
+ for:nil
+ arguments:nil
+ expect:'abcdefg'.
+
+ self
+ execute:'expr() {
+ return "a".concat("b", "c", "d", "e", "f", "g", "h") ;
+ }'
+ for:nil
+ arguments:nil
+ expect:'abcdefgh'.
+
+ self
+ execute:'expr(arg1, arg2, arg3) {
+ return arg1.concat(arg2, arg3) ;
+ }'
+ for:nil
+ arguments:#( (1) (2) (3) )
+ expect:#(1 2 3).
+
+ "
+ self run:#testOperators49_concat
+ self new testOperators49_concat
+ "
+!
+
testParserErrors01
self should:[
self
--- a/RegressionTests__StringTests.st Wed Jun 29 20:13:09 2016 +0100
+++ b/RegressionTests__StringTests.st Sat Nov 21 22:50:41 2015 +0000
@@ -157,13 +157,13 @@
|myStringClass s1|
Class withoutUpdatingChangesDo:[
- myStringClass := String
- subclass:#'MyString'
- instanceVariableNames:'foo'
- classVariableNames:''
- poolDictionaries:nil.
- myStringClass compile:'foo ^foo'.
- myStringClass compile:'foo:arg foo := arg'.
+ myStringClass := String
+ subclass:#'MyString'
+ instanceVariableNames:'foo'
+ classVariableNames:''
+ poolDictionaries:nil.
+ myStringClass compile:'foo ^foo'.
+ myStringClass compile:'foo:arg foo := arg'.
].
s1 := (myStringClass new:5) replaceFrom:1 with:'hello'.
@@ -213,19 +213,19 @@
parserFlags arraysAreImmutable:true.
Class withoutUpdatingChangesDo:[
- myClass := Object
- subclass:#'MyClass'
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:nil.
+ myClass := Object
+ subclass:#'MyClass'
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:nil.
- compiler := myClass compilerClass new.
- compiler parserFlags:parserFlags.
- compiler compile:'lit1 ^''hello''' forClass:myClass install:true.
+ compiler := myClass compilerClass new.
+ compiler parserFlags:parserFlags.
+ compiler compile:'lit1 ^''hello''' forClass:myClass install:true.
- compiler := myClass compilerClass new.
- compiler parserFlags:parserFlags.
- compiler compile:'lit2 ^#(''foo'' ''bar'' ''baz'')' forClass:myClass install:true.
+ compiler := myClass compilerClass new.
+ compiler parserFlags:parserFlags.
+ compiler compile:'lit2 ^#(''foo'' ''bar'' ''baz'')' forClass:myClass install:true.
].
s1 := myClass new perform:#lit1.
@@ -285,8 +285,8 @@
s := 'Some Sample Generators (74035660-d1f6-11df-9ab3-00ff7b08316c)'.
1 to:s size do:[:start |
- i := s indexOfAny:'-' startingAt:start.
- self assert:(i == 0 or:[ i >= start]).
+ i := s indexOfAny:'-' startingAt:start.
+ self assert:(i == 0 or:[ i >= start]).
].
"
@@ -301,8 +301,8 @@
s := 'Some Sample Generators (74035660-d1f6-11df-9ab3-00ff7b08316c)'.
1 to:s size do:[:start |
- i := s indexOf:$- startingAt:start.
- self assert:(i == 0 or:[ i >= start]).
+ i := s indexOf:$- startingAt:start.
+ self assert:(i == 0 or:[ i >= start]).
].
"
@@ -321,12 +321,12 @@
| tester |
tester := [:s|
- self assert: s hash == s asUnicode16String hash
- description: 'String and Unicode16String hashes differ!!'.
- self assert: s hash == s asUnicode32String hash
- description: 'String and Unicode32String hashes differ!!'.
- self assert: s asUnicode16String hash == s asUnicode32String hash
- description: 'Unicode16String and Unicode32String hashes differ!!'.
+ self assert: s hash == s asUnicode16String hash
+ description: 'String and Unicode16String hashes differ!!'.
+ self assert: s hash == s asUnicode32String hash
+ description: 'String and Unicode32String hashes differ!!'.
+ self assert: s asUnicode16String hash == s asUnicode32String hash
+ description: 'Unicode16String and Unicode32String hashes differ!!'.
].
tester value:'a'.
@@ -401,12 +401,12 @@
self assert: str = 'FFF'.
self should:[
- str from:-1 to:-1 put:$x
+ str from:-1 to:-1 put:$x
] raise:SubscriptOutOfBoundsError.
self assert: str = 'FFF'.
self should:[
- str from:-1 to:1 put:$x
+ str from:-1 to:1 put:$x
] raise:SubscriptOutOfBoundsError.
self assert: str = 'FFF'.
!