pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-05-02
2002-05-02 00:30:30 by Martin Nilsson <mani@lysator.liu.se>
878bf49b897c415b477d2616ae6749f7aa29c475 (
22
lines) (+
12
/-
10
)
[
Show
|
Annotate
]
Branch:
7.9
Run vtable and gc tests as test_tests.
Rev: src/testsuite.in:1.506
1:
-
test_true([["$Id: testsuite.in,v 1.
505
2002/05/
01
20
:
06
:
21
mast
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
506
2002/05/
02
00
:
30
:
30
nilsson
Exp $"]]);
cond([[all_constants()->_verify_internals]], [[
1777:
return sizeof( Program.all_inherits(D) - ({A,B,C}) ); ]],0)
-
test_
program
([[
+
test_
tests
([[
int errors; int tests;
1881:
} }
-
int a()
+
array(
int
)
a()
{ werror("\nTesting vtables and scope access.\n");
1917:
} werror("\n");
-
if(errors)
werror
(
"%d/%d
tests failed.\n",errors,
total_tests
);
-
return !
errors;
+
return
(
{
total_
tests
-
errors,
errors
})
;
} ]])
4179:
ifefun(gc, [[
-
test_
do
([[{
+
test_
tests
([[
array(int) a()
{
int got_error = 0; array(string) destruct_order; add_constant ("destructing", lambda (string id) {destruct_order += ({id});}); add_constant ("my_error", lambda (string s, mixed... args) { if (!got_error) werror ("\n"); werror (s, @args);
-
got_
error = 1
;
+
got_
error++
;
}); program Dead = compile_string (#" string id;
4773:
quiet=1; }
-
int
test
_failed = 0;
+
int
tests
_failed = 0;
+
int tests = 0;
for (int test = 0; test < sizeof (destruct_order_tests); test++) { [int nlive, int ndead, int nlnested, int ndnested, function(void:void) setup] = destruct_order_tests[test];
4783:
for (int f = nlive + ndead; f > 1; f--) n *= f; if(!quiet) werror ("GC destruct order test %d, %d permutations \r", test, n);
+
tests += n;
while (n--) { array(int) alloc_order = Array.permute (idx, n); array(int) create_order = ({});
4826:
else return "live[" + i + "]"; }) * ", " + "\n" "Destruct order was: " + destruct_order * ", " + "\n");
-
test
_failed =
1
;
+
tests
_failed
+
=
got_error
;
got_error = 0; break; } } }
-
if (test_failed) error ("GC destruct order test failed.\n");
+
werror ("%60s\r", "");
-
+
return ({ tests-tests_failed, tests_failed });
}]]) ]])