From 7f816bb01cc348203dedc50c58b0648b6ab8301d Mon Sep 17 00:00:00 2001 From: z78078 Date: Wed, 6 Jul 2022 14:11:03 +0800 Subject: [PATCH] modified the tests upon the changes --- nac3core/src/toplevel/test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nac3core/src/toplevel/test.rs b/nac3core/src/toplevel/test.rs index e74c21db..ab0decb0 100644 --- a/nac3core/src/toplevel/test.rs +++ b/nac3core/src/toplevel/test.rs @@ -116,7 +116,7 @@ fn test_simple_register(source: Vec<&str>) { let ast = parse_program(s, Default::default()).unwrap(); let ast = ast[0].clone(); - composer.register_top_level(ast, None, "".into()).unwrap(); + composer.register_top_level(ast, None, "".into(), false).unwrap(); } } @@ -163,7 +163,7 @@ fn test_simple_function_analyze(source: Vec<&str>, tys: Vec<&str>, names: Vec<&s let ast = ast[0].clone(); let (id, def_id, ty) = - composer.register_top_level(ast, Some(resolver.clone()), "".into()).unwrap(); + composer.register_top_level(ast, Some(resolver.clone()), "".into(), false).unwrap(); internal_resolver.add_id_def(id, def_id); if let Some(ty) = ty { internal_resolver.add_id_type(id, ty); @@ -515,7 +515,7 @@ fn test_analyze(source: Vec<&str>, res: Vec<&str>) { let ast = ast[0].clone(); let (id, def_id, ty) = { - match composer.register_top_level(ast, Some(resolver.clone()), "".into()) { + match composer.register_top_level(ast, Some(resolver.clone()), "".into(), false) { Ok(x) => x, Err(msg) => { if print { @@ -699,7 +699,7 @@ fn test_inference(source: Vec<&str>, res: Vec<&str>) { let ast = ast[0].clone(); let (id, def_id, ty) = { - match composer.register_top_level(ast, Some(resolver.clone()), "".into()) { + match composer.register_top_level(ast, Some(resolver.clone()), "".into(), false) { Ok(x) => x, Err(msg) => { if print {