Skip to content
Snippets Groups Projects
Commit 8ea241a5 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

more tests for cpp() added

Rev: src/testsuite.in:1.66
parent 143dcb2f
No related branches found
No related tags found
No related merge requests found
test_true([["$Id: testsuite.in,v 1.65 1998/01/16 21:40:17 hubbe Exp $"]])
test_true([["$Id: testsuite.in,v 1.66 1998/01/17 01:06:48 hubbe Exp $"]])
test_eq(1e1,10.0)
test_eq(1E1,10.0)
test_eq(1e+1,10.0)
......@@ -6,8 +6,9 @@ test_eq(1.1e1,11.0)
test_eq(1e-1,0.1)
test_eq('\x20',32)
test_eq("\x20","\040")
test_eq(cpp("#define FOO(X,Y) (X) (Y)\nFOO( (A),(B) )"),"# 1 \"-\"\n\n( (A) ) ( (B) )")
test_eq(cpp("#define F 'F'\nF"),"# 1 \"-\"\n\n'F'")
test_eq([[cpp("#define FOO(X,Y) (X) (Y)\nFOO( (A),(B) )")]],"# 1 \"-\"\n\n( (A) ) ( (B) )")
test_eq([[cpp("#define F 'F'\nF")]],"# 1 \"-\"\n\n'F'")
test_eq([[cpp("#define MAX(X,Y) ((X)>(Y)?(X):(Y))\n#define MAX3(X,Y,Z) MAX(MAX(X,Y),Z)\nMAX3(1,2,3)")]],"# 1 \"-\"\n\n\n(( (( 1 )>( 2 )?( 1 ):( 2 )) )>( 3 )?( (( 1 )>( 2 )?( 1 ):( 2 )) ):( 3 ))")
test_any([[object o=class foo{int c;class bar{void create(){c++;};}}(); o->bar(); return o->c;]],1)
test_do([[add_constant("GURKA2",class foo { int c; class bar{void create() {c+=17;}}}()); ]])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment