parent
9b94045170
commit
78a6f3bd5c
1 changed files with 3 additions and 11 deletions
@ -1,16 +1,8 @@ |
|||||||
project('string arithmetic', 'c') |
project('string arithmetic', 'c') |
||||||
|
|
||||||
if 'foo' + 'bar' != 'foobar' |
assert('foo' + 'bar' == 'foobar') |
||||||
error('String concatenation is broken') |
assert('foo' + 'bar' + 'baz' == 'foobarbaz') |
||||||
endif |
|
||||||
|
|
||||||
if 'foo' + 'bar' + 'baz' != 'foobarbaz' |
|
||||||
error('Many-string concatenation is broken') |
|
||||||
endif |
|
||||||
|
|
||||||
a = 'a' |
a = 'a' |
||||||
b = 'b' |
b = 'b' |
||||||
|
assert(a + b + 'c' == 'abc') |
||||||
if a + b + 'c' != 'abc' |
|
||||||
error('String concat with variables is broken.') |
|
||||||
endif |
|
||||||
|
Loading…
Reference in new issue