From 4f49edaa6628b5c8310c939a8fed35c0c26f4b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Tue, 3 Jun 2014 23:45:38 +0200 Subject: [PATCH] VM: tests that rely on the integer values of the vm_error_type needs to be updated --- basis/compiler/tests/linkage-errors.factor | 86 +++++++++++----------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/basis/compiler/tests/linkage-errors.factor b/basis/compiler/tests/linkage-errors.factor index 27040f420f..b622ccc09d 100644 --- a/basis/compiler/tests/linkage-errors.factor +++ b/basis/compiler/tests/linkage-errors.factor @@ -1,48 +1,48 @@ -USING: tools.test namespaces assocs alien.syntax kernel -compiler.errors accessors alien alien.c-types alien.strings -debugger literals kernel.private ; -FROM: alien.libraries => add-library load-library ; -IN: compiler.tests.linkage-errors - -! Regression: calling an undefined function would raise a protection fault -FUNCTION: void this_does_not_exist ( ) ; - -[ this_does_not_exist ] try - -[ this_does_not_exist ] [ +USING: tools.test namespaces assocs alien.syntax kernel +compiler.errors accessors alien alien.c-types alien.strings +debugger literals kernel.private ; +FROM: alien.libraries => add-library load-library ; +IN: compiler.tests.linkage-errors + +! Regression: calling an undefined function would raise a protection fault +FUNCTION: void this_does_not_exist ( ) ; + +[ this_does_not_exist ] try + +[ this_does_not_exist ] [ ${ "kernel-error" ERROR-UNDEFINED-SYMBOL "this_does_not_exist" string>symbol f } - = -] must-fail-with - -[ T{ no-such-symbol { name "this_does_not_exist" } } ] -[ - \ this_does_not_exist linkage-errors get at error>> - ! We don't care about the error message from dlerror, just - ! wipe it out - clone f >>message -] unit-test - -<< "no_such_library" "no_such_library" cdecl add-library >> - -LIBRARY: no_such_library - -FUNCTION: void no_such_function ( ) ; - -[ no_such_function ] try - -[ no_such_function ] [ + = +] must-fail-with + +[ T{ no-such-symbol { name "this_does_not_exist" } } ] +[ + \ this_does_not_exist linkage-errors get at error>> + ! We don't care about the error message from dlerror, just + ! wipe it out + clone f >>message +] unit-test + +<< "no_such_library" "no_such_library" cdecl add-library >> + +LIBRARY: no_such_library + +FUNCTION: void no_such_function ( ) ; + +[ no_such_function ] try + +[ no_such_function ] [ ${ "kernel-error" ERROR-UNDEFINED-SYMBOL "no_such_function" string>symbol "no_such_library" load-library - } - = -] must-fail-with - -[ T{ no-such-library { name "no_such_library" } } ] -[ - \ no_such_function linkage-errors get at error>> - ! We don't care about the error message from dlerror, just - ! wipe it out - clone f >>message -] unit-test + } + = +] must-fail-with + +[ T{ no-such-library { name "no_such_library" } } ] +[ + \ no_such_function linkage-errors get at error>> + ! We don't care about the error message from dlerror, just + ! wipe it out + clone f >>message +] unit-test