pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2014-08-26
2014-08-26 14:05:48 by Martin Nilsson <nilsson@opera.com>
ec4f039e851354eddc89c1a53e927281602400e6 (
15
lines) (+
15
/-
0
)
[
Show
|
Annotate
]
Branch:
8.0
Tests for __COUNTER__
9553:
test_true(intp(__REAL_BUILD__)) test_eq(__PIKE__,1)
+
test_any_equal([[
+
int base = __COUNTER__;
+
#define X __COUNTER__
+
return map( ({ __COUNTER__, X, __COUNTER__ }), `-, base);
+
]], [[ ({ 1,2,3 }) ]])
+
test_any_equal([[
+
int base = __COUNTER__;
+
#define X __COUNTER__
+
return map( ({ __COUNTER__, X, __COUNTER__ }), `-, base);
+
]], [[ ({ 1,2,3 }) ]])
+
test_do(add_constant("COUNTER",__COUNTER__))
+
test_eq(__COUNTER__-1,COUNTER)
+
test_do(add_constant("COUNTER"))
+
test_eq( compile_string("string a=#\"a\nb\";")()->a, "a\nb" ) test_eq( compile_string("string a=#\"a\r\nb\";")()->a, "a\nb" ) test_eq( compile_string("string a=#\"a\n\rb\";")()->a, "a\nb" )