Skip to content
Snippets Groups Projects
Commit e7cdfd97 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[tests] simplify test

- no 3d party module dependency
- don't have a stack dump as oracle
parent 714a13d3
No related branches found
No related tags found
No related merge requests found
/* run.config /* run.config
MACRO: PTEST_MAKE_MODULE make FRAMAC_USER_OFLAGS="-package why3" FRAMAC_USER_BFLAGS="-package why3"
MODULE: @PTEST_DIR@/@PTEST_NAME@.cmxs MODULE: @PTEST_DIR@/@PTEST_NAME@.cmxs
OPT: OPT:
*/ */
......
...@@ -3,9 +3,7 @@ open Cil_types ...@@ -3,9 +3,7 @@ open Cil_types
let load_theory = function let load_theory = function
| { pred_content = Papp (_, [], [ { term_node = TConst(LStr _name) } ] ) } -> | { pred_content = Papp (_, [], [ { term_node = TConst(LStr _name) } ] ) } ->
let open Why3 in ignore ( raise Not_found
Theory.import_namespace Theory.empty_ns [_name]
)
| _ -> assert false | _ -> assert false
let typing ~typing_context ~loc lexprs = let typing ~typing_context ~loc lexprs =
...@@ -20,3 +18,14 @@ let typing ~typing_context ~loc lexprs = ...@@ -20,3 +18,14 @@ let typing ~typing_context ~loc lexprs =
let () = let () =
Logic_typing.register_global_extension "why3" false typing Logic_typing.register_global_extension "why3" false typing
let main () =
try
Kernel.feedback
"Checking handler of exception occurring in extension typing";
Ast.compute (); Kernel.fatal "Extension typing should have failed"
with Not_found -> Kernel.feedback "Extension typing failed as expected"
let () = Kernel.TypeCheck.set false
let () = Db.Main.extend main
[kernel] Checking handler of exception occurring in extension typing
[kernel] Parsing tests/spec/extend_extern.i (no preprocessing)
[kernel] Extension typing failed as expected
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