mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
Ensure that all test cases call testlib_init so that the testlib assertion handler is installed: this ensures that on windows you can set mps_testlib_noabort to avoid the dialog box from abort().
Copied from Perforce Change: 184965 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
29b0fa91d2
commit
cf0d96dd0b
39 changed files with 128 additions and 137 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/* abqtest.c: AVAILABLE BLOCK QUEUE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include "abq.h"
|
||||
|
|
@ -154,8 +154,7 @@ extern int main(int argc, char *argv[])
|
|||
mps_arena_t arena;
|
||||
int i;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
abqSize = 0;
|
||||
|
||||
|
|
@ -178,7 +177,7 @@ extern int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* amcss.c: POOL CLASS AMC STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -306,8 +306,7 @@ int main(int argc, char *argv[])
|
|||
mps_arena_t arena;
|
||||
mps_thr_t thread;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), 2*testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -331,7 +330,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* amcsshe.c: POOL CLASS AMC STRESS TEST WITH HEADER
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -262,8 +262,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), 3*testArenaSIZE),
|
||||
"arena_create\n");
|
||||
|
|
@ -285,7 +284,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* amcssth.c: POOL CLASS AMC STRESS TEST WITH TWO THREADS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
* .posix: This is Posix only.
|
||||
|
|
@ -322,8 +322,7 @@ int main(int argc, char *argv[])
|
|||
void *r;
|
||||
int childIsFinished = 0;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -358,7 +357,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* amsss.c: POOL CLASS AMS STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
* .design: Adapted from amcss.c, but not counting collections, just
|
||||
|
|
@ -207,8 +207,7 @@ int main(int argc, char *argv[])
|
|||
mps_pool_t pool;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -280,7 +279,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* amssshe.c: POOL CLASS AMS STRESS TEST WITH HEADERS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .design: Adapted from amsss.c.
|
||||
*/
|
||||
|
|
@ -162,8 +162,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -179,7 +178,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* apss.c: AP MANUAL ALLOC STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -190,8 +190,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
bothOptions = MPS_PF_ALIGN == 8 ? &bothOptions8 : &bothOptions16;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), 2*testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -226,7 +225,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* arenacv.c: ARENA COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .coverage: At the moment, we're only trying to cover the new code
|
||||
* (partial mapping of the page table and vm overflow).
|
||||
|
|
@ -399,7 +399,8 @@ static void testSize(Size size)
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
void *block;
|
||||
testlib_unused(argc);
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
testPageTable((ArenaClass)mps_arena_class_vm(), TEST_ARENA_SIZE, 0, TRUE);
|
||||
testPageTable((ArenaClass)mps_arena_class_vm(), TEST_ARENA_SIZE, 0, FALSE);
|
||||
|
|
@ -417,7 +418,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* awlut.c: POOL CLASS AWL UNIT TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* DESIGN
|
||||
*
|
||||
|
|
@ -316,8 +316,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
initialise_wrapper(wrapper_wrapper);
|
||||
initialise_wrapper(string_wrapper);
|
||||
|
|
@ -339,7 +338,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* awluthe.c: POOL CLASS AWL UNIT TEST WITH OBJECT HEADERS
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* DESIGN
|
||||
*
|
||||
|
|
@ -319,8 +319,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
initialise_wrapper(wrapper_wrapper);
|
||||
initialise_wrapper(string_wrapper);
|
||||
|
|
@ -342,7 +341,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* awlutth.c: THREADING UNIT TEST USING POOL CLASS AWL
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* DESIGN
|
||||
*
|
||||
|
|
@ -316,8 +316,7 @@ int main(int argc, char *argv[])
|
|||
mps_arena_t arena;
|
||||
pthread_t pthread1;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
initialise_wrapper(wrapper_wrapper);
|
||||
initialise_wrapper(string_wrapper);
|
||||
|
|
@ -337,7 +336,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* btss.c: BIT TABLE COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .readership: MPS developers
|
||||
*
|
||||
|
|
@ -550,8 +550,7 @@ int main(int argc, char *argv[])
|
|||
/* tests need 4 whole words plus a few extra bits */
|
||||
btSize = MPS_WORD_WIDTH * 4 + 10;
|
||||
|
||||
testlib_unused(argc);
|
||||
testlib_unused(argv);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&mpsArena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -572,7 +571,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* bttest.c: BIT TABLE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ extern int main(int argc, char *argv[])
|
|||
bt = NULL;
|
||||
btSize = 0;
|
||||
|
||||
testlib_unused(argc); testlib_unused(argv);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create((mps_arena_t*)&arena, mps_arena_class_vm(),
|
||||
testArenaSIZE),
|
||||
|
|
@ -387,7 +387,7 @@ extern int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* exposet0.c: ARENA EXPOSE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* The primary purpose of this test is to test that mps_arena_expose does
|
||||
|
|
@ -255,8 +255,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), 2*testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -275,7 +274,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* expt825.c: Test for bug described in job000825
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* DESIGN
|
||||
|
|
@ -262,7 +262,8 @@ int main(int argc, char *argv[])
|
|||
mps_arena_t arena;
|
||||
mps_thr_t thread;
|
||||
void *r;
|
||||
testlib_unused(argc);
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create\n");
|
||||
|
|
@ -278,7 +279,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* fbmtest.c: FREE BLOCK MANAGEMENT TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* The MPS contains two free block management modules:
|
||||
*
|
||||
|
|
@ -560,7 +560,7 @@ extern int main(int argc, char *argv[])
|
|||
CBSStruct cbsStruct;
|
||||
Align align;
|
||||
|
||||
randomize(argc, argv);
|
||||
testlib_init(argc, argv);
|
||||
align = (1 << rnd() % 4) * MPS_PF_ALIGN;
|
||||
|
||||
NAllocateTried = NAllocateSucceeded = NDeallocateTried =
|
||||
|
|
@ -616,7 +616,7 @@ extern int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* finalcv.c: FINALIZATION COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* DESIGN
|
||||
|
|
@ -217,8 +217,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create\n");
|
||||
|
|
@ -234,7 +233,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* finaltest.c: LARGE-SCALE FINALIZATION TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* DESIGN
|
||||
|
|
@ -245,7 +245,8 @@ int main(int argc, char *argv[])
|
|||
mps_arena_t arena;
|
||||
mps_thr_t thread;
|
||||
void *r;
|
||||
testlib_unused(argc);
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create\n");
|
||||
|
|
@ -261,7 +262,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* fotest.c: FAIL-OVER TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* This tests fail-over behaviour in low memory situations. The MVFF
|
||||
|
|
@ -170,8 +170,7 @@ int main(int argc, char *argv[])
|
|||
mps_pool_t pool;
|
||||
mps_align_t alignment;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -218,7 +217,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -193,8 +193,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
mps_arena_t arena;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, testArenaSIZE);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* lockcov.c: LOCK COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include "mpm.h"
|
||||
|
|
@ -14,7 +14,8 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
Lock a = malloc(LockSize());
|
||||
Lock b = malloc(LockSize());
|
||||
testlib_unused(argc);
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
Insist(a != NULL);
|
||||
Insist(b != NULL);
|
||||
|
|
@ -53,7 +54,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* lockutw3.c: LOCK UTILIZATION TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include "mpm.h"
|
||||
|
|
@ -71,6 +71,8 @@ int main(int argc, char *argv[])
|
|||
HANDLE t[10];
|
||||
unsigned i;
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
lock = malloc(LockSize());
|
||||
Insist(lock != NULL);
|
||||
|
||||
|
|
@ -96,7 +98,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -237,9 +237,7 @@ static void runArenaTest(size_t size,
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
printf("\nRunning test with no information about peak usage.\n");
|
||||
runArenaTest(smallArenaSize, FALSE, FALSE);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* locv.c: LEAF OBJECT POOL CLASS COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* This is (not much of) a coverage test for the Leaf Object
|
||||
* pool (PoolClassLO).
|
||||
|
|
@ -48,7 +48,8 @@ int main(int argc, char *argv[])
|
|||
mps_ap_t ap;
|
||||
mps_addr_t p;
|
||||
mps_root_t root;
|
||||
testlib_unused(argc);
|
||||
|
||||
testlib_init(argc, argv);
|
||||
|
||||
locv_fmt.align = sizeof(void *); /* .fmt.align.delayed */
|
||||
|
||||
|
|
@ -169,7 +170,7 @@ static void stepper(mps_addr_t addr, mps_fmt_t fmt, mps_pool_t pool,
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* messtest.c: MESSAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include "mpm.h"
|
||||
|
|
@ -261,8 +261,7 @@ extern int main(int argc, char *argv[])
|
|||
mps_arena_t mpsArena;
|
||||
Arena arena;
|
||||
|
||||
testlib_unused(argc);
|
||||
testlib_unused(argv);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&mpsArena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -279,7 +278,7 @@ extern int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* mpmss.c: MPM STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -188,8 +188,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
bothOptions = MPS_PF_ALIGN == 8 ? &bothOptions8 : &bothOptions16;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -208,7 +207,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* mpsicv.c: MPSI COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -583,8 +583,7 @@ int main(int argc, char *argv[])
|
|||
void *r;
|
||||
void *marker = ▮
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), TEST_ARENA_SIZE),
|
||||
"arena_create");
|
||||
|
|
@ -609,7 +608,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* mv2test.c: POOLMVT STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -203,7 +203,7 @@ static void stress_with_arena_class(mps_arena_class_t aclass, Bool zoned)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
randomize(argc, argv);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
stress_with_arena_class(mps_arena_class_vm(), TRUE);
|
||||
stress_with_arena_class(mps_arena_class_vm(), FALSE);
|
||||
|
|
@ -215,7 +215,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* poolncv.c: NULL POOL COVERAGE TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*/
|
||||
|
||||
#include "mpm.h"
|
||||
|
|
@ -33,7 +33,7 @@ static void testit(ArenaClass class, ArgList args)
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
testlib_unused(argc);
|
||||
testlib_init(argc, argv);
|
||||
MPS_ARGS_BEGIN(args) {
|
||||
MPS_ARGS_ADD(args, MPS_KEY_ARENA_SIZE, 600000);
|
||||
testit((ArenaClass)mps_arena_class_vm(), args);
|
||||
|
|
@ -45,7 +45,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* qs.c: QUICKSORT
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* The purpose of this program is to act as a "real" client of the MM.
|
||||
* It is a test, but (hopefully) less contrived than some of the other
|
||||
|
|
@ -528,8 +528,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -543,7 +542,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* sacss.c: SAC MANUAL ALLOC STRESS TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*/
|
||||
|
||||
|
|
@ -191,8 +191,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
mps_arena_t arena;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"mps_arena_create");
|
||||
|
|
@ -216,7 +215,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* segsmss.c: Segment splitting and merging stress test
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (c) 2002 Global Graphics Software.
|
||||
*
|
||||
* .design: Adapted from amsss.c (because AMS already supports
|
||||
|
|
@ -854,8 +854,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(), testArenaSIZE),
|
||||
"arena_create");
|
||||
|
|
@ -871,7 +870,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* steptest.c: TEST FOR ARENA STEPPING
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 1998-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* Loosely based on <code/amcss.c>.
|
||||
*/
|
||||
|
|
@ -492,8 +492,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
prepare_clock();
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
while (test_number < TESTS) {
|
||||
mps_arena_t arena;
|
||||
|
|
@ -519,7 +518,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* teletest.c: TELEMETRY TEST
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* .source: The command parser here was taken and adapted from bttest.c.
|
||||
*/
|
||||
|
|
@ -200,8 +200,7 @@ static void obeyCommand(char *command)
|
|||
|
||||
extern int main(int argc, char *argv[])
|
||||
{
|
||||
testlib_unused(argc);
|
||||
testlib_unused(argv);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create((mps_arena_t*)&arena, mps_arena_class_vm(),
|
||||
testArenaSIZE),
|
||||
|
|
@ -223,7 +222,7 @@ extern int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* testlib.c: TEST LIBRARY
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* .purpose: A library of functions that may be of use to unit tests.
|
||||
|
|
@ -409,10 +409,18 @@ void assert_die(const char *file, unsigned line, const char *condition)
|
|||
}
|
||||
|
||||
|
||||
/* testlib_init -- install assertion handler and seed RNG */
|
||||
|
||||
void testlib_init(int argc, char *argv[])
|
||||
{
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
randomize(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -227,6 +227,11 @@ extern double rnd_double(void);
|
|||
extern void randomize(int argc, char *argv[]);
|
||||
|
||||
|
||||
/* testlib_init -- install assertion handler and seed RNG */
|
||||
|
||||
extern void testlib_init(int argc, char *argv[]);
|
||||
|
||||
|
||||
#endif /* testlib_h */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* walkt0.c: WALK TEST 0
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 1998-2013 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 1998-2014 Ravenbrook Limited. See end of file for license.
|
||||
*
|
||||
* Loosely based on <code/steptest.c>.
|
||||
*/
|
||||
|
|
@ -201,8 +201,7 @@ int main(int argc, char *argv[])
|
|||
mps_thr_t thread;
|
||||
void *r;
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
die(mps_arena_create(&arena, mps_arena_class_vm(),
|
||||
testArenaSIZE),
|
||||
|
|
@ -219,7 +218,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* zcoll.c: Collection test
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2008 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2008-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* OBJECTIVE
|
||||
|
|
@ -838,8 +838,7 @@ static void testscriptA(const char *script)
|
|||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
/* 1<<19 == 524288 == 1/2 Mebibyte */
|
||||
/* 16<<20 == 16777216 == 16 Mebibyte */
|
||||
|
|
@ -938,7 +937,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* zmess.c: Message test
|
||||
*
|
||||
* $Id$
|
||||
* Copyright (c) 2008 Ravenbrook Limited. See end of file for license.
|
||||
* Copyright (c) 2008-2014 Ravenbrook Limited. See end of file for license.
|
||||
* Portions copyright (C) 2002 Global Graphics Software.
|
||||
*
|
||||
* OBJECTIVE
|
||||
|
|
@ -486,9 +486,7 @@ Bool TIMCA_remote(void)
|
|||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
randomize(argc, argv);
|
||||
mps_lib_assert_fail_install(assert_die);
|
||||
testlib_init(argc, argv);
|
||||
|
||||
/* Scripts that should fail (uncomment to show failure is detected) */
|
||||
/*testscriptA("C.");*/
|
||||
|
|
@ -571,7 +569,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* C. COPYRIGHT AND LICENSE
|
||||
*
|
||||
* Copyright (c) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* Copyright (c) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
|
||||
* All rights reserved. This is an open source license. Contact
|
||||
* Ravenbrook for commercial licensing options.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue