pike.git
/
src
/
testsuite.in
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/testsuite.in:1213:
test_any([[ // Test that backtraces with event handlers are rendered correctly. // These backtraces have caused SEGV's due to function pointers // out of bounds. cf [bug 6156]. return catch { Builtin.__Backtrace_Tester__(); }[1][-1][2]; ]], Builtin.__Backtrace_Tester__) test_compile_warning([[ class A { static int foo = 1; int bar() { return foo; } } ]])
+
test_any_equal([[
+
// Test that filename and line numbers in backtraces are correct.
+
// This specific test used to trigger two different bugs.
+
// cf [LysLysKOM 22997909].
+
int whee(string w)
+
{
+
#line 7 "whee-before"
+
int x = 0;
+
error("whee!\n");
+
#line 10 "whee-after"
+
string q = "wq";
+
q += "21";
+
return sizeof(q + w);
+
}
+
#line 15 "test"
+
mixed err = catch { whee("foo"); };
+
return ({ err[1][-1][0], err[1][-1][1] });
+
]], ({ "whee-before", 8 }))
test_any([[ // Test multiple inherit of same symbol, // where later symbol is protected. class A { constant foo = 1; }; class B { constant foo = 2; }; class C { inherit A; protected inherit B; }; return C()->foo; ]], 1)
pike.git/src/testsuite.in:10752:
// <<<<<<< test_any([[ master()->set_inhibit_compile_errors(1); int x = !!catch(cpp("<<<<<<<")); master()->set_inhibit_compile_errors(0); return x; ]], 1) test_compile_error([[ #if 0
-
<<<<<<<
+
#endif ]]) define(do_test_cpp_string,[[ test_eq([[ (({""}) + (string)indices("."*256)/"" + ({""})) * $1]], [[ Stdio.write_file("testsuite.tmp",a()),compile_string("string s=#string \"testsuite.tmp\";")()->s ]]) ]])