From 00e87e65020db7720ce0915d75af50a7c756e1b5 Mon Sep 17 00:00:00 2001 From: LunaAmora Date: Mon, 13 Nov 2023 11:35:00 -0400 Subject: [PATCH] improve tests settings --- tests/golden_tests.rs | 13 ++++++-- .../golden_tests/adt_generation/common.golden | 33 ------------------- tests/golden_tests/adt_generation/expr.golden | 25 -------------- .../adt_generation/weekday.golden | 15 --------- tests/golden_tests/compile_file/expr.golden | 26 --------------- .../non_exhaustive_pattern.golden | 1 - .../golden_tests/compile_file/weekday.golden | 9 ----- ...m.snap => adt_generation__common.hvm.snap} | 2 +- ...hvm.snap => adt_generation__expr.hvm.snap} | 2 +- ....snap => adt_generation__weekday.hvm.snap} | 2 +- ...m.snap => compile_file__addition.hvm.snap} | 2 +- ...ile__bad_parens_making_erased_let.hvm.snap | 5 +++ ...l.hvm.snap => compile_file__bool.hvm.snap} | 2 +- ...snap => compile_file__cyclic_dup.hvm.snap} | 2 +- ...nap => compile_file__double_main.hvm.snap} | 2 +- ...x0.hvm.snap => compile_file__ex0.hvm.snap} | 2 +- ...x2.hvm.snap => compile_file__ex2.hvm.snap} | 2 +- ...vm.snap => compile_file__example.hvm.snap} | 2 +- ...r.hvm.snap => compile_file__expr.hvm.snap} | 2 +- ...mpile_file__extracted_match_pred.hvm.snap} | 2 +- .../compile_file__hvm1_main.hvm.snap | 6 ++++ ...snap => compile_file__inline_app.hvm.snap} | 2 +- ....snap => compile_file__long_name.hvm.snap} | 2 +- ...ile_file__non_exhaustive_pattern.hvm.snap} | 2 +- ...snap => compile_file__ref_to_ref.hvm.snap} | 2 +- ...le_file__repeated_name_trucation.hvm.snap} | 2 +- ...m.snap => compile_file__self_ref.hvm.snap} | 2 +- ...nd.hvm.snap => compile_file__snd.hvm.snap} | 2 +- ...vm.snap => compile_file__spacing.hvm.snap} | 2 +- ...m.snap => compile_file__spacing2.hvm.snap} | 2 +- ...=> compile_file__var_shadows_ref.hvm.snap} | 2 +- ...vm.snap => compile_file__weekday.hvm.snap} | 2 +- ...m.snap => compile_term__addition.hvm.snap} | 2 +- ...snap => compile_term__church_one.hvm.snap} | 2 +- .../compile_term__church_zero.hvm.snap | 5 +++ ...=> compile_term__complicated_dup.hvm.snap} | 2 +- ... compile_term__cyclic_global_lam.hvm.snap} | 2 +- .../compile_term__dup_apply.hvm.snap | 5 +++ ... => compile_term__dup_global_lam.hvm.snap} | 2 +- .../compile_term__erased_dup.hvm.snap | 5 +++ ...vm.snap => compile_term__fst_snd.hvm.snap} | 2 +- ...snap => compile_term__global_lam.hvm.snap} | 2 +- tests/snapshots/compile_term__id.hvm.snap | 5 +++ .../compile_term__infer_dup.hvm.snap | 5 +++ .../compile_term__let_substitution.hvm.snap | 5 +++ ...vm.snap => compile_term__let_tup.hvm.snap} | 2 +- ...s.hvm.snap => compile_term__lets.hvm.snap} | 2 +- ....hvm.snap => compile_term__match.hvm.snap} | 2 +- ...snap => compile_term__nested_let.hvm.snap} | 2 +- ...p2.hvm.snap => compile_term__op2.hvm.snap} | 2 +- .../compile_term__simple_tup.hvm.snap | 5 +++ ...up.hvm.snap => compile_term__tup.hvm.snap} | 2 +- ...vm.snap => compile_term__tup_add.hvm.snap} | 2 +- .../compile_term__unbound_var.hvm.snap | 5 +++ .../compile_term__unbound_var_scope.hvm.snap | 5 +++ ...p => flatten_rules__already_flat.hvm.snap} | 2 +- ....snap => flatten_rules__bits_dec.hvm.snap} | 2 +- ...ap => flatten_rules__nested_ctrs.hvm.snap} | 2 +- ...ile__bad_parens_making_erased_let.hvm.snap | 5 --- ...en_tests__compile_file__hvm1_main.hvm.snap | 6 ---- ..._tests__compile_term__church_zero.hvm.snap | 5 --- ...en_tests__compile_term__dup_apply.hvm.snap | 5 --- ...n_tests__compile_term__erased_dup.hvm.snap | 5 --- .../golden_tests__compile_term__id.hvm.snap | 5 --- ...en_tests__compile_term__infer_dup.hvm.snap | 5 --- ...s__compile_term__let_substitution.hvm.snap | 5 --- ...n_tests__compile_term__simple_tup.hvm.snap | 5 --- ..._tests__compile_term__unbound_var.hvm.snap | 5 --- ...__compile_term__unbound_var_scope.hvm.snap | 5 --- ...en_tests__readback_lnet__addition.hvm.snap | 5 --- ...en_tests__readback_lnet__bad_net1.hvm.snap | 5 --- ...en_tests__readback_lnet__bad_net3.hvm.snap | 5 --- .../golden_tests__readback_lnet__id.hvm.snap | 5 --- ...lden_tests__readback_lnet__number.hvm.snap | 5 --- ..._tests__readback_lnet__simple_tup.hvm.snap | 5 --- ...tests__run_single_files__addition.hvm.snap | 5 --- ..._run_single_files__dup_global_lam.hvm.snap | 5 --- ..._tests__run_single_files__example.hvm.snap | 5 --- ...ingle_files__extracted_match_pred.hvm.snap | 5 --- ...en_tests__run_single_files__match.hvm.snap | 5 --- ...den_tests__run_single_files__pred.hvm.snap | 5 --- ..._single_files__readback_hvm1_main.hvm.snap | 5 --- ..._single_files__readback_hvm2_main.hvm.snap | 5 --- ..._run_single_files__unused_dup_var.hvm.snap | 5 --- .../readback_lnet__addition.hvm.snap | 5 +++ ...m.snap => readback_lnet__bad_net.hvm.snap} | 2 +- .../readback_lnet__bad_net1.hvm.snap | 5 +++ .../readback_lnet__bad_net3.hvm.snap | 5 +++ ...> readback_lnet__complicated_dup.hvm.snap} | 2 +- ...m.snap => readback_lnet__fst_snd.hvm.snap} | 2 +- tests/snapshots/readback_lnet__id.hvm.snap | 5 +++ ...hvm.snap => readback_lnet__match.hvm.snap} | 2 +- ...nap => readback_lnet__nested_let.hvm.snap} | 2 +- ...nap => readback_lnet__nested_tup.hvm.snap} | 2 +- .../snapshots/readback_lnet__number.hvm.snap | 5 +++ .../readback_lnet__simple_tup.hvm.snap | 5 +++ ...m.snap => readback_lnet__tup_add.hvm.snap} | 2 +- .../run_single_files__addition.hvm.snap | 5 +++ .../run_single_files__dup_global_lam.hvm.snap | 5 +++ ....snap => run_single_files__empty.hvm.snap} | 2 +- .../run_single_files__example.hvm.snap | 5 +++ ...ingle_files__extracted_match_pred.hvm.snap | 5 +++ .../run_single_files__match.hvm.snap | 5 +++ .../snapshots/run_single_files__pred.hvm.snap | 5 +++ ....snap => run_single_files__queue.hvm.snap} | 2 +- ..._single_files__readback_hvm1_main.hvm.snap | 5 +++ ..._single_files__readback_hvm2_main.hvm.snap | 5 +++ ...e_files__repeated_name_trucation.hvm.snap} | 2 +- .../run_single_files__unused_dup_var.hvm.snap | 5 +++ 109 files changed, 192 insertions(+), 292 deletions(-) delete mode 100644 tests/golden_tests/adt_generation/common.golden delete mode 100644 tests/golden_tests/adt_generation/expr.golden delete mode 100644 tests/golden_tests/adt_generation/weekday.golden delete mode 100644 tests/golden_tests/compile_file/expr.golden delete mode 100644 tests/golden_tests/compile_file/non_exhaustive_pattern.golden delete mode 100644 tests/golden_tests/compile_file/weekday.golden rename tests/snapshots/{golden_tests__adt_generation__common.hvm.snap => adt_generation__common.hvm.snap} (92%) rename tests/snapshots/{golden_tests__adt_generation__expr.hvm.snap => adt_generation__expr.hvm.snap} (94%) rename tests/snapshots/{golden_tests__adt_generation__weekday.hvm.snap => adt_generation__weekday.hvm.snap} (92%) rename tests/snapshots/{golden_tests__compile_file__addition.hvm.snap => compile_file__addition.hvm.snap} (65%) create mode 100644 tests/snapshots/compile_file__bad_parens_making_erased_let.hvm.snap rename tests/snapshots/{golden_tests__compile_file__bool.hvm.snap => compile_file__bool.hvm.snap} (72%) rename tests/snapshots/{golden_tests__compile_file__cyclic_dup.hvm.snap => compile_file__cyclic_dup.hvm.snap} (50%) rename tests/snapshots/{golden_tests__compile_file__double_main.hvm.snap => compile_file__double_main.hvm.snap} (57%) rename tests/snapshots/{golden_tests__compile_file__ex0.hvm.snap => compile_file__ex0.hvm.snap} (73%) rename tests/snapshots/{golden_tests__compile_file__ex2.hvm.snap => compile_file__ex2.hvm.snap} (91%) rename tests/snapshots/{golden_tests__compile_file__example.hvm.snap => compile_file__example.hvm.snap} (72%) rename tests/snapshots/{golden_tests__compile_file__expr.hvm.snap => compile_file__expr.hvm.snap} (93%) rename tests/snapshots/{golden_tests__compile_file__extracted_match_pred.hvm.snap => compile_file__extracted_match_pred.hvm.snap} (69%) create mode 100644 tests/snapshots/compile_file__hvm1_main.hvm.snap rename tests/snapshots/{golden_tests__compile_file__inline_app.hvm.snap => compile_file__inline_app.hvm.snap} (68%) rename tests/snapshots/{golden_tests__compile_file__long_name.hvm.snap => compile_file__long_name.hvm.snap} (58%) rename tests/snapshots/{golden_tests__compile_file__non_exhaustive_pattern.hvm.snap => compile_file__non_exhaustive_pattern.hvm.snap} (66%) rename tests/snapshots/{golden_tests__compile_file__ref_to_ref.hvm.snap => compile_file__ref_to_ref.hvm.snap} (57%) rename tests/snapshots/{golden_tests__compile_file__repeated_name_trucation.hvm.snap => compile_file__repeated_name_trucation.hvm.snap} (55%) rename tests/snapshots/{golden_tests__compile_file__self_ref.hvm.snap => compile_file__self_ref.hvm.snap} (58%) rename tests/snapshots/{golden_tests__compile_file__snd.hvm.snap => compile_file__snd.hvm.snap} (62%) rename tests/snapshots/{golden_tests__compile_file__spacing.hvm.snap => compile_file__spacing.hvm.snap} (60%) rename tests/snapshots/{golden_tests__compile_file__spacing2.hvm.snap => compile_file__spacing2.hvm.snap} (59%) rename tests/snapshots/{golden_tests__compile_file__var_shadows_ref.hvm.snap => compile_file__var_shadows_ref.hvm.snap} (57%) rename tests/snapshots/{golden_tests__compile_file__weekday.hvm.snap => compile_file__weekday.hvm.snap} (73%) rename tests/snapshots/{golden_tests__compile_term__addition.hvm.snap => compile_term__addition.hvm.snap} (62%) rename tests/snapshots/{golden_tests__compile_term__church_one.hvm.snap => compile_term__church_one.hvm.snap} (60%) create mode 100644 tests/snapshots/compile_term__church_zero.hvm.snap rename tests/snapshots/{golden_tests__compile_term__complicated_dup.hvm.snap => compile_term__complicated_dup.hvm.snap} (57%) rename tests/snapshots/{golden_tests__compile_term__cyclic_global_lam.hvm.snap => compile_term__cyclic_global_lam.hvm.snap} (59%) create mode 100644 tests/snapshots/compile_term__dup_apply.hvm.snap rename tests/snapshots/{golden_tests__compile_term__dup_global_lam.hvm.snap => compile_term__dup_global_lam.hvm.snap} (52%) create mode 100644 tests/snapshots/compile_term__erased_dup.hvm.snap rename tests/snapshots/{golden_tests__compile_term__fst_snd.hvm.snap => compile_term__fst_snd.hvm.snap} (61%) rename tests/snapshots/{golden_tests__compile_term__global_lam.hvm.snap => compile_term__global_lam.hvm.snap} (50%) create mode 100644 tests/snapshots/compile_term__id.hvm.snap create mode 100644 tests/snapshots/compile_term__infer_dup.hvm.snap create mode 100644 tests/snapshots/compile_term__let_substitution.hvm.snap rename tests/snapshots/{golden_tests__compile_term__let_tup.hvm.snap => compile_term__let_tup.hvm.snap} (51%) rename tests/snapshots/{golden_tests__compile_term__lets.hvm.snap => compile_term__lets.hvm.snap} (75%) rename tests/snapshots/{golden_tests__compile_term__match.hvm.snap => compile_term__match.hvm.snap} (61%) rename tests/snapshots/{golden_tests__compile_term__nested_let.hvm.snap => compile_term__nested_let.hvm.snap} (56%) rename tests/snapshots/{golden_tests__compile_term__op2.hvm.snap => compile_term__op2.hvm.snap} (81%) create mode 100644 tests/snapshots/compile_term__simple_tup.hvm.snap rename tests/snapshots/{golden_tests__compile_term__tup.hvm.snap => compile_term__tup.hvm.snap} (51%) rename tests/snapshots/{golden_tests__compile_term__tup_add.hvm.snap => compile_term__tup_add.hvm.snap} (57%) create mode 100644 tests/snapshots/compile_term__unbound_var.hvm.snap create mode 100644 tests/snapshots/compile_term__unbound_var_scope.hvm.snap rename tests/snapshots/{golden_tests__flatten_rules__already_flat.hvm.snap => flatten_rules__already_flat.hvm.snap} (85%) rename tests/snapshots/{golden_tests__flatten_rules__bits_dec.hvm.snap => flatten_rules__bits_dec.hvm.snap} (91%) rename tests/snapshots/{golden_tests__flatten_rules__nested_ctrs.hvm.snap => flatten_rules__nested_ctrs.hvm.snap} (80%) delete mode 100644 tests/snapshots/golden_tests__compile_file__bad_parens_making_erased_let.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_file__hvm1_main.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__church_zero.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__dup_apply.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__erased_dup.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__id.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__infer_dup.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__let_substitution.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__simple_tup.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__unbound_var.hvm.snap delete mode 100644 tests/snapshots/golden_tests__compile_term__unbound_var_scope.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__addition.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__bad_net1.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__bad_net3.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__id.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__number.hvm.snap delete mode 100644 tests/snapshots/golden_tests__readback_lnet__simple_tup.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__addition.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__dup_global_lam.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__example.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__extracted_match_pred.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__match.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__pred.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__readback_hvm1_main.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__readback_hvm2_main.hvm.snap delete mode 100644 tests/snapshots/golden_tests__run_single_files__unused_dup_var.hvm.snap create mode 100644 tests/snapshots/readback_lnet__addition.hvm.snap rename tests/snapshots/{golden_tests__readback_lnet__bad_net.hvm.snap => readback_lnet__bad_net.hvm.snap} (50%) create mode 100644 tests/snapshots/readback_lnet__bad_net1.hvm.snap create mode 100644 tests/snapshots/readback_lnet__bad_net3.hvm.snap rename tests/snapshots/{golden_tests__readback_lnet__complicated_dup.hvm.snap => readback_lnet__complicated_dup.hvm.snap} (52%) rename tests/snapshots/{golden_tests__readback_lnet__fst_snd.hvm.snap => readback_lnet__fst_snd.hvm.snap} (63%) create mode 100644 tests/snapshots/readback_lnet__id.hvm.snap rename tests/snapshots/{golden_tests__readback_lnet__match.hvm.snap => readback_lnet__match.hvm.snap} (54%) rename tests/snapshots/{golden_tests__readback_lnet__nested_let.hvm.snap => readback_lnet__nested_let.hvm.snap} (59%) rename tests/snapshots/{golden_tests__readback_lnet__nested_tup.hvm.snap => readback_lnet__nested_tup.hvm.snap} (50%) create mode 100644 tests/snapshots/readback_lnet__number.hvm.snap create mode 100644 tests/snapshots/readback_lnet__simple_tup.hvm.snap rename tests/snapshots/{golden_tests__readback_lnet__tup_add.hvm.snap => readback_lnet__tup_add.hvm.snap} (54%) create mode 100644 tests/snapshots/run_single_files__addition.hvm.snap create mode 100644 tests/snapshots/run_single_files__dup_global_lam.hvm.snap rename tests/snapshots/{golden_tests__run_single_files__empty.hvm.snap => run_single_files__empty.hvm.snap} (53%) create mode 100644 tests/snapshots/run_single_files__example.hvm.snap create mode 100644 tests/snapshots/run_single_files__extracted_match_pred.hvm.snap create mode 100644 tests/snapshots/run_single_files__match.hvm.snap create mode 100644 tests/snapshots/run_single_files__pred.hvm.snap rename tests/snapshots/{golden_tests__run_single_files__queue.hvm.snap => run_single_files__queue.hvm.snap} (62%) create mode 100644 tests/snapshots/run_single_files__readback_hvm1_main.hvm.snap create mode 100644 tests/snapshots/run_single_files__readback_hvm2_main.hvm.snap rename tests/snapshots/{golden_tests__run_single_files__repeated_name_trucation.hvm.snap => run_single_files__repeated_name_trucation.hvm.snap} (52%) create mode 100644 tests/snapshots/run_single_files__unused_dup_var.hvm.snap diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs index c34b9827..e99e29ee 100644 --- a/tests/golden_tests.rs +++ b/tests/golden_tests.rs @@ -33,7 +33,7 @@ fn do_parse_net(code: &str) -> Result { parse_net(&mut code.chars().peekable()) } -const TESTS_PATH: &'static str = "/tests/golden_tests/"; +const TESTS_PATH: &str = "/tests/golden_tests/"; fn run_single_golden_test( path: &Path, @@ -43,7 +43,16 @@ fn run_single_golden_test( let file_name = path.to_str().and_then(|path| path.rsplit_once(TESTS_PATH)).unwrap().1; let result: String = run(path, &code).unwrap_or_else(|err| err); - assert_snapshot!(file_name, result); + + let mut settings = insta::Settings::clone_current(); + settings.set_prepend_module_to_snapshot(false); + settings.set_omit_expression(true); + settings.set_input_file(path); + + settings.bind(|| { + assert_snapshot!(file_name, result); + }); + Ok(()) } diff --git a/tests/golden_tests/adt_generation/common.golden b/tests/golden_tests/adt_generation/common.golden deleted file mode 100644 index 4d8da6fd..00000000 --- a/tests/golden_tests/adt_generation/common.golden +++ /dev/null @@ -1,33 +0,0 @@ -(True) = λTrue λFalse True - -(False) = λTrue λFalse False - -(Filled) = λa0 λFilled λEmpty (Filled a0) - -(Empty) = λFilled λEmpty Empty - -(North) = λNorth λSouth λEast λWest North - -(South) = λNorth λSouth λEast λWest South - -(East) = λNorth λSouth λEast λWest East - -(West) = λNorth λSouth λEast λWest West - -(Red) = λRed λYellow λGreen Red - -(Yellow) = λRed λYellow λGreen Yellow - -(Green) = λRed λYellow λGreen Green - -(Cons) = λa0 λa1 λCons λNil ((Cons a0) a1) - -(Nil) = λCons λNil Nil - -(Some) = λa0 λSome λNone (Some a0) - -(None) = λSome λNone None - -(Ok) = λa0 λOk λErr (Ok a0) - -(Err) = λa0 λOk λErr (Err a0) \ No newline at end of file diff --git a/tests/golden_tests/adt_generation/expr.golden b/tests/golden_tests/adt_generation/expr.golden deleted file mode 100644 index 7e72c4ae..00000000 --- a/tests/golden_tests/adt_generation/expr.golden +++ /dev/null @@ -1,25 +0,0 @@ -(Var) = λa0 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (Var a0) - -(Num) = λa0 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (Num a0) - -(App) = λa0 λa1 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 ((App a0) a1) - -(Fun) = λa0 λa1 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 ((Fun a0) a1) - -(If) = λa0 λa1 λa2 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (((If a0) a1) a2) - -(Let) = λa0 λa1 λa2 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (((Let a0) a1) a2) - -(Dup) = λa0 λa1 λa2 λa3 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 ((((Dup a0) a1) a2) a3) - -(Tup) = λa0 λa1 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 ((Tup a0) a1) - -(Op2) = λa0 λa1 λa2 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (((Op2 a0) a1) a2) - -(Add) = λAdd λSub λMul λDiv Add - -(Sub) = λAdd λSub λMul λDiv Sub - -(Mul) = λAdd λSub λMul λDiv Mul - -(Div) = λAdd λSub λMul λDiv Div \ No newline at end of file diff --git a/tests/golden_tests/adt_generation/weekday.golden b/tests/golden_tests/adt_generation/weekday.golden deleted file mode 100644 index 7a960609..00000000 --- a/tests/golden_tests/adt_generation/weekday.golden +++ /dev/null @@ -1,15 +0,0 @@ -(main) = (λx x Saturday) - -(Monday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Monday - -(Tuesday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Tuesday - -(Wednesday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Wednesday - -(Thursday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Thursday - -(Friday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Friday - -(Saturday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Saturday - -(Sunday) = λMonday λTuesday λWednesday λThursday λFriday λSaturday λSunday Sunday \ No newline at end of file diff --git a/tests/golden_tests/compile_file/expr.golden b/tests/golden_tests/compile_file/expr.golden deleted file mode 100644 index d7c772d2..00000000 --- a/tests/golden_tests/compile_file/expr.golden +++ /dev/null @@ -1,26 +0,0 @@ -@App = (a (b (* (* ((a (b c)) (* (* (* (* (* (* c))))))))))) -@Dup = (a (b (c (d (* (* (* (* (* (* ((a (b (c (d e)))) (* (* e))))))))))))) -@F = (a (* (* a))) -@G = (a (* a)) -@H = (* @G) -@Let = (a (b (c (* (* (* (* (* ((a (b (c d))) (* (* (* d)))))))))))) -@Mul = (* @H) -@Num = (a (* ((a b) (* (* (* (* (* (* (* b)))))))))) -@Op2 = (a (b (c (* (* (* (* (* (* (* (* ((a (b (c d))) d)))))))))))) -@Sub = (* @F) -@Var = (a ((a b) (* (* (* (* (* (* (* (* b)))))))))) -@main = a -& (b (c (d a))) ~ @Let -& (e (f (g (h d)))) ~ @Dup -& (i (j h)) ~ @App -& (#2 j) ~ @Var -& (#1 i) ~ @Var -& (#0 g) ~ @Var -& (#2 f) ~ @Var -& (#1 e) ~ @Var -& (@Mul (k c)) ~ @Op2 -& (@Sub (l (m (n k)))) ~ @Op2 -& (#3 n) ~ @Num -& (#1 m) ~ @Num -& (#2 l) ~ @Num -& (#0 b) ~ @Var diff --git a/tests/golden_tests/compile_file/non_exhaustive_pattern.golden b/tests/golden_tests/compile_file/non_exhaustive_pattern.golden deleted file mode 100644 index 43a0a5e9..00000000 --- a/tests/golden_tests/compile_file/non_exhaustive_pattern.golden +++ /dev/null @@ -1 +0,0 @@ -Non-exhaustive pattern at definition 'Foo'. Argument 2 of type 'Type' does not cover the 'A' constructor \ No newline at end of file diff --git a/tests/golden_tests/compile_file/weekday.golden b/tests/golden_tests/compile_file/weekday.golden deleted file mode 100644 index 48de09db..00000000 --- a/tests/golden_tests/compile_file/weekday.golden +++ /dev/null @@ -1,9 +0,0 @@ -@9 = (a a) -@K = (a (* a)) -@L = (* @K) -@M = (* @L) -@N = (* @M) -@O = (* @N) -@Satu = (* @O) -@main = a -& (@Satu a) ~ @9 diff --git a/tests/snapshots/golden_tests__adt_generation__common.hvm.snap b/tests/snapshots/adt_generation__common.hvm.snap similarity index 92% rename from tests/snapshots/golden_tests__adt_generation__common.hvm.snap rename to tests/snapshots/adt_generation__common.hvm.snap index 9abe4d74..3cf91bc5 100644 --- a/tests/snapshots/golden_tests__adt_generation__common.hvm.snap +++ b/tests/snapshots/adt_generation__common.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/adt_generation/common.hvm --- (True) = λTrue λFalse True diff --git a/tests/snapshots/golden_tests__adt_generation__expr.hvm.snap b/tests/snapshots/adt_generation__expr.hvm.snap similarity index 94% rename from tests/snapshots/golden_tests__adt_generation__expr.hvm.snap rename to tests/snapshots/adt_generation__expr.hvm.snap index cee76224..e3ea54ca 100644 --- a/tests/snapshots/golden_tests__adt_generation__expr.hvm.snap +++ b/tests/snapshots/adt_generation__expr.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/adt_generation/expr.hvm --- (Var) = λa0 λVar λNum λApp λFun λIf λLet λDup λTup λOp2 (Var a0) diff --git a/tests/snapshots/golden_tests__adt_generation__weekday.hvm.snap b/tests/snapshots/adt_generation__weekday.hvm.snap similarity index 92% rename from tests/snapshots/golden_tests__adt_generation__weekday.hvm.snap rename to tests/snapshots/adt_generation__weekday.hvm.snap index 056c86a5..b78ddd63 100644 --- a/tests/snapshots/golden_tests__adt_generation__weekday.hvm.snap +++ b/tests/snapshots/adt_generation__weekday.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/adt_generation/weekday.hvm --- (main) = (λx x Saturday) diff --git a/tests/snapshots/golden_tests__compile_file__addition.hvm.snap b/tests/snapshots/compile_file__addition.hvm.snap similarity index 65% rename from tests/snapshots/golden_tests__compile_file__addition.hvm.snap rename to tests/snapshots/compile_file__addition.hvm.snap index f6640b41..4e1b1686 100644 --- a/tests/snapshots/golden_tests__compile_file__addition.hvm.snap +++ b/tests/snapshots/compile_file__addition.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/addition.hvm --- @2 = (a b) & > ~ #1 diff --git a/tests/snapshots/compile_file__bad_parens_making_erased_let.hvm.snap b/tests/snapshots/compile_file__bad_parens_making_erased_let.hvm.snap new file mode 100644 index 00000000..651a5202 --- /dev/null +++ b/tests/snapshots/compile_file__bad_parens_making_erased_let.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_file/bad_parens_making_erased_let.hvm +--- +Unbound variable 'two' diff --git a/tests/snapshots/golden_tests__compile_file__bool.hvm.snap b/tests/snapshots/compile_file__bool.hvm.snap similarity index 72% rename from tests/snapshots/golden_tests__compile_file__bool.hvm.snap rename to tests/snapshots/compile_file__bool.hvm.snap index 5d312ff9..4966c123 100644 --- a/tests/snapshots/golden_tests__compile_file__bool.hvm.snap +++ b/tests/snapshots/compile_file__bool.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/bool.hvm --- @5 = (a a) @Not = ((@fals (@true a)) a) diff --git a/tests/snapshots/golden_tests__compile_file__cyclic_dup.hvm.snap b/tests/snapshots/compile_file__cyclic_dup.hvm.snap similarity index 50% rename from tests/snapshots/golden_tests__compile_file__cyclic_dup.hvm.snap rename to tests/snapshots/compile_file__cyclic_dup.hvm.snap index e3d3bf73..2aafeb06 100644 --- a/tests/snapshots/golden_tests__compile_file__cyclic_dup.hvm.snap +++ b/tests/snapshots/compile_file__cyclic_dup.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/cyclic_dup.hvm --- Unbound variable 'y1' diff --git a/tests/snapshots/golden_tests__compile_file__double_main.hvm.snap b/tests/snapshots/compile_file__double_main.hvm.snap similarity index 57% rename from tests/snapshots/golden_tests__compile_file__double_main.hvm.snap rename to tests/snapshots/compile_file__double_main.hvm.snap index df75bf9e..0d636ee5 100644 --- a/tests/snapshots/golden_tests__compile_file__double_main.hvm.snap +++ b/tests/snapshots/compile_file__double_main.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/double_main.hvm --- File has both 'Main' and 'main' definitions diff --git a/tests/snapshots/golden_tests__compile_file__ex0.hvm.snap b/tests/snapshots/compile_file__ex0.hvm.snap similarity index 73% rename from tests/snapshots/golden_tests__compile_file__ex0.hvm.snap rename to tests/snapshots/compile_file__ex0.hvm.snap index 66ce14b5..1f7b4f10 100644 --- a/tests/snapshots/golden_tests__compile_file__ex0.hvm.snap +++ b/tests/snapshots/compile_file__ex0.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/ex0.hvm --- @9 = (a a) @C_2 = ({2 (a b) (c a)} (c b)) diff --git a/tests/snapshots/golden_tests__compile_file__ex2.hvm.snap b/tests/snapshots/compile_file__ex2.hvm.snap similarity index 91% rename from tests/snapshots/golden_tests__compile_file__ex2.hvm.snap rename to tests/snapshots/compile_file__ex2.hvm.snap index e47db08e..7b732a96 100644 --- a/tests/snapshots/golden_tests__compile_file__ex2.hvm.snap +++ b/tests/snapshots/compile_file__ex2.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/ex2.hvm --- @E = (* @G) @F = (a a) diff --git a/tests/snapshots/golden_tests__compile_file__example.hvm.snap b/tests/snapshots/compile_file__example.hvm.snap similarity index 72% rename from tests/snapshots/golden_tests__compile_file__example.hvm.snap rename to tests/snapshots/compile_file__example.hvm.snap index 7a360b07..74f782be 100644 --- a/tests/snapshots/golden_tests__compile_file__example.hvm.snap +++ b/tests/snapshots/compile_file__example.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/example.hvm --- @7 = (a a) @8 = (a a) diff --git a/tests/snapshots/golden_tests__compile_file__expr.hvm.snap b/tests/snapshots/compile_file__expr.hvm.snap similarity index 93% rename from tests/snapshots/golden_tests__compile_file__expr.hvm.snap rename to tests/snapshots/compile_file__expr.hvm.snap index c37f1e8d..8259cdac 100644 --- a/tests/snapshots/golden_tests__compile_file__expr.hvm.snap +++ b/tests/snapshots/compile_file__expr.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/expr.hvm --- @App = (a (b (* (* ((a (b c)) (* (* (* (* (* (* c))))))))))) @Dup = (a (b (c (d (* (* (* (* (* (* ((a (b (c (d e)))) (* (* e))))))))))))) diff --git a/tests/snapshots/golden_tests__compile_file__extracted_match_pred.hvm.snap b/tests/snapshots/compile_file__extracted_match_pred.hvm.snap similarity index 69% rename from tests/snapshots/golden_tests__compile_file__extracted_match_pred.hvm.snap rename to tests/snapshots/compile_file__extracted_match_pred.hvm.snap index 7c3723cf..539035de 100644 --- a/tests/snapshots/golden_tests__compile_file__extracted_match_pred.hvm.snap +++ b/tests/snapshots/compile_file__extracted_match_pred.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/extracted_match_pred.hvm --- @5 = (a b) & (a b) ~ @valS diff --git a/tests/snapshots/compile_file__hvm1_main.hvm.snap b/tests/snapshots/compile_file__hvm1_main.hvm.snap new file mode 100644 index 00000000..66ca6117 --- /dev/null +++ b/tests/snapshots/compile_file__hvm1_main.hvm.snap @@ -0,0 +1,6 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_file/hvm1_main.hvm +--- +@main = (a a) + diff --git a/tests/snapshots/golden_tests__compile_file__inline_app.hvm.snap b/tests/snapshots/compile_file__inline_app.hvm.snap similarity index 68% rename from tests/snapshots/golden_tests__compile_file__inline_app.hvm.snap rename to tests/snapshots/compile_file__inline_app.hvm.snap index 75e2df99..eb96d5d9 100644 --- a/tests/snapshots/golden_tests__compile_file__inline_app.hvm.snap +++ b/tests/snapshots/compile_file__inline_app.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/inline_app.hvm --- @Rul1 = (a a) @Rul2 = (a a) diff --git a/tests/snapshots/golden_tests__compile_file__long_name.hvm.snap b/tests/snapshots/compile_file__long_name.hvm.snap similarity index 58% rename from tests/snapshots/golden_tests__compile_file__long_name.hvm.snap rename to tests/snapshots/compile_file__long_name.hvm.snap index e98315a2..f18d9527 100644 --- a/tests/snapshots/golden_tests__compile_file__long_name.hvm.snap +++ b/tests/snapshots/compile_file__long_name.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/long_name.hvm --- @WowT = (a a) @main = (a b) diff --git a/tests/snapshots/golden_tests__compile_file__non_exhaustive_pattern.hvm.snap b/tests/snapshots/compile_file__non_exhaustive_pattern.hvm.snap similarity index 66% rename from tests/snapshots/golden_tests__compile_file__non_exhaustive_pattern.hvm.snap rename to tests/snapshots/compile_file__non_exhaustive_pattern.hvm.snap index 71c0c452..d188bd79 100644 --- a/tests/snapshots/golden_tests__compile_file__non_exhaustive_pattern.hvm.snap +++ b/tests/snapshots/compile_file__non_exhaustive_pattern.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/non_exhaustive_pattern.hvm --- Non-exhaustive pattern at definition 'Foo'. Argument 2 of type 'Type' does not cover the 'A' constructor diff --git a/tests/snapshots/golden_tests__compile_file__ref_to_ref.hvm.snap b/tests/snapshots/compile_file__ref_to_ref.hvm.snap similarity index 57% rename from tests/snapshots/golden_tests__compile_file__ref_to_ref.hvm.snap rename to tests/snapshots/compile_file__ref_to_ref.hvm.snap index a933fc90..bc823f5e 100644 --- a/tests/snapshots/golden_tests__compile_file__ref_to_ref.hvm.snap +++ b/tests/snapshots/compile_file__ref_to_ref.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/ref_to_ref.hvm --- @A2 = #1 @B5 = #2 diff --git a/tests/snapshots/golden_tests__compile_file__repeated_name_trucation.hvm.snap b/tests/snapshots/compile_file__repeated_name_trucation.hvm.snap similarity index 55% rename from tests/snapshots/golden_tests__compile_file__repeated_name_trucation.hvm.snap rename to tests/snapshots/compile_file__repeated_name_trucation.hvm.snap index c3964f2c..7c237174 100644 --- a/tests/snapshots/golden_tests__compile_file__repeated_name_trucation.hvm.snap +++ b/tests/snapshots/compile_file__repeated_name_trucation.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/repeated_name_trucation.hvm --- @1 = (* @3) @3 = (* @1) diff --git a/tests/snapshots/golden_tests__compile_file__self_ref.hvm.snap b/tests/snapshots/compile_file__self_ref.hvm.snap similarity index 58% rename from tests/snapshots/golden_tests__compile_file__self_ref.hvm.snap rename to tests/snapshots/compile_file__self_ref.hvm.snap index 5ddba9b6..e13e3bee 100644 --- a/tests/snapshots/golden_tests__compile_file__self_ref.hvm.snap +++ b/tests/snapshots/compile_file__self_ref.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/self_ref.hvm --- Definition main is a reference to itself diff --git a/tests/snapshots/golden_tests__compile_file__snd.hvm.snap b/tests/snapshots/compile_file__snd.hvm.snap similarity index 62% rename from tests/snapshots/golden_tests__compile_file__snd.hvm.snap rename to tests/snapshots/compile_file__snd.hvm.snap index 427fa9dc..80f1316c 100644 --- a/tests/snapshots/golden_tests__compile_file__snd.hvm.snap +++ b/tests/snapshots/compile_file__snd.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/snd.hvm --- @main = a & ([#0 #42] a) ~ @snd diff --git a/tests/snapshots/golden_tests__compile_file__spacing.hvm.snap b/tests/snapshots/compile_file__spacing.hvm.snap similarity index 60% rename from tests/snapshots/golden_tests__compile_file__spacing.hvm.snap rename to tests/snapshots/compile_file__spacing.hvm.snap index 00edc4c3..313e7642 100644 --- a/tests/snapshots/golden_tests__compile_file__spacing.hvm.snap +++ b/tests/snapshots/compile_file__spacing.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/spacing.hvm --- @2 = (a a) @main = ({2 a b} c) diff --git a/tests/snapshots/golden_tests__compile_file__spacing2.hvm.snap b/tests/snapshots/compile_file__spacing2.hvm.snap similarity index 59% rename from tests/snapshots/golden_tests__compile_file__spacing2.hvm.snap rename to tests/snapshots/compile_file__spacing2.hvm.snap index e0edfc14..e3e09a75 100644 --- a/tests/snapshots/golden_tests__compile_file__spacing2.hvm.snap +++ b/tests/snapshots/compile_file__spacing2.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/spacing2.hvm --- @2 = (a a) @3 = (a a) diff --git a/tests/snapshots/golden_tests__compile_file__var_shadows_ref.hvm.snap b/tests/snapshots/compile_file__var_shadows_ref.hvm.snap similarity index 57% rename from tests/snapshots/golden_tests__compile_file__var_shadows_ref.hvm.snap rename to tests/snapshots/compile_file__var_shadows_ref.hvm.snap index 84b6bee7..473a39bf 100644 --- a/tests/snapshots/golden_tests__compile_file__var_shadows_ref.hvm.snap +++ b/tests/snapshots/compile_file__var_shadows_ref.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/var_shadows_ref.hvm --- @3 = (a a) @a = (a a) diff --git a/tests/snapshots/golden_tests__compile_file__weekday.hvm.snap b/tests/snapshots/compile_file__weekday.hvm.snap similarity index 73% rename from tests/snapshots/golden_tests__compile_file__weekday.hvm.snap rename to tests/snapshots/compile_file__weekday.hvm.snap index 13d17f51..cb82bf9e 100644 --- a/tests/snapshots/golden_tests__compile_file__weekday.hvm.snap +++ b/tests/snapshots/compile_file__weekday.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_file/weekday.hvm --- @9 = (a a) @K = (a (* a)) diff --git a/tests/snapshots/golden_tests__compile_term__addition.hvm.snap b/tests/snapshots/compile_term__addition.hvm.snap similarity index 62% rename from tests/snapshots/golden_tests__compile_term__addition.hvm.snap rename to tests/snapshots/compile_term__addition.hvm.snap index 1b5be75b..891dfbe9 100644 --- a/tests/snapshots/golden_tests__compile_term__addition.hvm.snap +++ b/tests/snapshots/compile_term__addition.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/addition.hvm --- a & (#8 a) ~ (b c) diff --git a/tests/snapshots/golden_tests__compile_term__church_one.hvm.snap b/tests/snapshots/compile_term__church_one.hvm.snap similarity index 60% rename from tests/snapshots/golden_tests__compile_term__church_one.hvm.snap rename to tests/snapshots/compile_term__church_one.hvm.snap index 23223a2d..5ab442fd 100644 --- a/tests/snapshots/golden_tests__compile_term__church_one.hvm.snap +++ b/tests/snapshots/compile_term__church_one.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/church_one.hvm --- a & ((* (b b)) a) ~ ((c (d e)) ({2 (e f) c} (d f))) diff --git a/tests/snapshots/compile_term__church_zero.hvm.snap b/tests/snapshots/compile_term__church_zero.hvm.snap new file mode 100644 index 00000000..24326f4b --- /dev/null +++ b/tests/snapshots/compile_term__church_zero.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/church_zero.hvm +--- +(* (a a)) diff --git a/tests/snapshots/golden_tests__compile_term__complicated_dup.hvm.snap b/tests/snapshots/compile_term__complicated_dup.hvm.snap similarity index 57% rename from tests/snapshots/golden_tests__compile_term__complicated_dup.hvm.snap rename to tests/snapshots/compile_term__complicated_dup.hvm.snap index 7564a2e9..7abc3d18 100644 --- a/tests/snapshots/golden_tests__compile_term__complicated_dup.hvm.snap +++ b/tests/snapshots/compile_term__complicated_dup.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/complicated_dup.hvm --- ({3 (a b) (c d)} e) & ((f {2 a c}) b) ~ ((f d) e) diff --git a/tests/snapshots/golden_tests__compile_term__cyclic_global_lam.hvm.snap b/tests/snapshots/compile_term__cyclic_global_lam.hvm.snap similarity index 59% rename from tests/snapshots/golden_tests__compile_term__cyclic_global_lam.hvm.snap rename to tests/snapshots/compile_term__cyclic_global_lam.hvm.snap index 9090c0c4..fc81c167 100644 --- a/tests/snapshots/golden_tests__compile_term__cyclic_global_lam.hvm.snap +++ b/tests/snapshots/compile_term__cyclic_global_lam.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/cyclic_global_lam.hvm --- Found term that compiles into an inet with a vicious cycle diff --git a/tests/snapshots/compile_term__dup_apply.hvm.snap b/tests/snapshots/compile_term__dup_apply.hvm.snap new file mode 100644 index 00000000..6374cb50 --- /dev/null +++ b/tests/snapshots/compile_term__dup_apply.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/dup_apply.hvm +--- +({2 (a b) a} b) diff --git a/tests/snapshots/golden_tests__compile_term__dup_global_lam.hvm.snap b/tests/snapshots/compile_term__dup_global_lam.hvm.snap similarity index 52% rename from tests/snapshots/golden_tests__compile_term__dup_global_lam.hvm.snap rename to tests/snapshots/compile_term__dup_global_lam.hvm.snap index 5e076ed3..19bef41d 100644 --- a/tests/snapshots/golden_tests__compile_term__dup_global_lam.hvm.snap +++ b/tests/snapshots/compile_term__dup_global_lam.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/dup_global_lam.hvm --- a & (b a) ~ ({2 (c b) c} (d d)) diff --git a/tests/snapshots/compile_term__erased_dup.hvm.snap b/tests/snapshots/compile_term__erased_dup.hvm.snap new file mode 100644 index 00000000..84aaaf34 --- /dev/null +++ b/tests/snapshots/compile_term__erased_dup.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/erased_dup.hvm +--- +({2 * a} a) diff --git a/tests/snapshots/golden_tests__compile_term__fst_snd.hvm.snap b/tests/snapshots/compile_term__fst_snd.hvm.snap similarity index 61% rename from tests/snapshots/golden_tests__compile_term__fst_snd.hvm.snap rename to tests/snapshots/compile_term__fst_snd.hvm.snap index d7a094e5..d7ad1af1 100644 --- a/tests/snapshots/golden_tests__compile_term__fst_snd.hvm.snap +++ b/tests/snapshots/compile_term__fst_snd.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/fst_snd.hvm --- a & (b a) ~ ([* c] c) diff --git a/tests/snapshots/golden_tests__compile_term__global_lam.hvm.snap b/tests/snapshots/compile_term__global_lam.hvm.snap similarity index 50% rename from tests/snapshots/golden_tests__compile_term__global_lam.hvm.snap rename to tests/snapshots/compile_term__global_lam.hvm.snap index 405482b4..63a5e7e4 100644 --- a/tests/snapshots/golden_tests__compile_term__global_lam.hvm.snap +++ b/tests/snapshots/compile_term__global_lam.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/global_lam.hvm --- a & (b a) ~ (b (c c)) diff --git a/tests/snapshots/compile_term__id.hvm.snap b/tests/snapshots/compile_term__id.hvm.snap new file mode 100644 index 00000000..91baa3bc --- /dev/null +++ b/tests/snapshots/compile_term__id.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/id.hvm +--- +(a a) diff --git a/tests/snapshots/compile_term__infer_dup.hvm.snap b/tests/snapshots/compile_term__infer_dup.hvm.snap new file mode 100644 index 00000000..1173e6b7 --- /dev/null +++ b/tests/snapshots/compile_term__infer_dup.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/infer_dup.hvm +--- +({2 a (a b)} b) diff --git a/tests/snapshots/compile_term__let_substitution.hvm.snap b/tests/snapshots/compile_term__let_substitution.hvm.snap new file mode 100644 index 00000000..fd20ae1f --- /dev/null +++ b/tests/snapshots/compile_term__let_substitution.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/let_substitution.hvm +--- +({2 a (a b)} b) diff --git a/tests/snapshots/golden_tests__compile_term__let_tup.hvm.snap b/tests/snapshots/compile_term__let_tup.hvm.snap similarity index 51% rename from tests/snapshots/golden_tests__compile_term__let_tup.hvm.snap rename to tests/snapshots/compile_term__let_tup.hvm.snap index 4b29f0d3..f825aed7 100644 --- a/tests/snapshots/golden_tests__compile_term__let_tup.hvm.snap +++ b/tests/snapshots/compile_term__let_tup.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/let_tup.hvm --- [(a (* a)) (* (b b))] diff --git a/tests/snapshots/golden_tests__compile_term__lets.hvm.snap b/tests/snapshots/compile_term__lets.hvm.snap similarity index 75% rename from tests/snapshots/golden_tests__compile_term__lets.hvm.snap rename to tests/snapshots/compile_term__lets.hvm.snap index 8c9fe01c..950091cb 100644 --- a/tests/snapshots/golden_tests__compile_term__lets.hvm.snap +++ b/tests/snapshots/compile_term__lets.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/lets.hvm --- a & (b (c (d a))) ~ (e e) diff --git a/tests/snapshots/golden_tests__compile_term__match.hvm.snap b/tests/snapshots/compile_term__match.hvm.snap similarity index 61% rename from tests/snapshots/golden_tests__compile_term__match.hvm.snap rename to tests/snapshots/compile_term__match.hvm.snap index 0f386c0d..21086d85 100644 --- a/tests/snapshots/golden_tests__compile_term__match.hvm.snap +++ b/tests/snapshots/compile_term__match.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/match.hvm --- a & <#0 <#1 ? ((b (* b)) (* (* (c c)))) a>> ~ #1 diff --git a/tests/snapshots/golden_tests__compile_term__nested_let.hvm.snap b/tests/snapshots/compile_term__nested_let.hvm.snap similarity index 56% rename from tests/snapshots/golden_tests__compile_term__nested_let.hvm.snap rename to tests/snapshots/compile_term__nested_let.hvm.snap index 640023c5..11f22853 100644 --- a/tests/snapshots/golden_tests__compile_term__nested_let.hvm.snap +++ b/tests/snapshots/compile_term__nested_let.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/nested_let.hvm --- a & [[* *] [a *]] ~ [[#2 #4] [#3 #6]] diff --git a/tests/snapshots/golden_tests__compile_term__op2.hvm.snap b/tests/snapshots/compile_term__op2.hvm.snap similarity index 81% rename from tests/snapshots/golden_tests__compile_term__op2.hvm.snap rename to tests/snapshots/compile_term__op2.hvm.snap index 4f1f5662..f8d1e2f3 100644 --- a/tests/snapshots/golden_tests__compile_term__op2.hvm.snap +++ b/tests/snapshots/compile_term__op2.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/op2.hvm --- a & > ~ #1 diff --git a/tests/snapshots/compile_term__simple_tup.hvm.snap b/tests/snapshots/compile_term__simple_tup.hvm.snap new file mode 100644 index 00000000..f4bfd58f --- /dev/null +++ b/tests/snapshots/compile_term__simple_tup.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/simple_tup.hvm +--- +[#0 #42] diff --git a/tests/snapshots/golden_tests__compile_term__tup.hvm.snap b/tests/snapshots/compile_term__tup.hvm.snap similarity index 51% rename from tests/snapshots/golden_tests__compile_term__tup.hvm.snap rename to tests/snapshots/compile_term__tup.hvm.snap index 1574394b..a5b779ee 100644 --- a/tests/snapshots/golden_tests__compile_term__tup.hvm.snap +++ b/tests/snapshots/compile_term__tup.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/tup.hvm --- [[#1 #4] [#2 #3]] diff --git a/tests/snapshots/golden_tests__compile_term__tup_add.hvm.snap b/tests/snapshots/compile_term__tup_add.hvm.snap similarity index 57% rename from tests/snapshots/golden_tests__compile_term__tup_add.hvm.snap rename to tests/snapshots/compile_term__tup_add.hvm.snap index 7286d8cf..6c278c7a 100644 --- a/tests/snapshots/golden_tests__compile_term__tup_add.hvm.snap +++ b/tests/snapshots/compile_term__tup_add.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/compile_term/tup_add.hvm --- a & > ~ #1 diff --git a/tests/snapshots/compile_term__unbound_var.hvm.snap b/tests/snapshots/compile_term__unbound_var.hvm.snap new file mode 100644 index 00000000..b0ca65c5 --- /dev/null +++ b/tests/snapshots/compile_term__unbound_var.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/unbound_var.hvm +--- +Unbound variable 'a' diff --git a/tests/snapshots/compile_term__unbound_var_scope.hvm.snap b/tests/snapshots/compile_term__unbound_var_scope.hvm.snap new file mode 100644 index 00000000..e4327843 --- /dev/null +++ b/tests/snapshots/compile_term__unbound_var_scope.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/compile_term/unbound_var_scope.hvm +--- +Unbound variable 'b' diff --git a/tests/snapshots/golden_tests__flatten_rules__already_flat.hvm.snap b/tests/snapshots/flatten_rules__already_flat.hvm.snap similarity index 85% rename from tests/snapshots/golden_tests__flatten_rules__already_flat.hvm.snap rename to tests/snapshots/flatten_rules__already_flat.hvm.snap index 02ef499e..faabdb83 100644 --- a/tests/snapshots/golden_tests__flatten_rules__already_flat.hvm.snap +++ b/tests/snapshots/flatten_rules__already_flat.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/flatten_rules/already_flat.hvm --- (Rule1) = λx x diff --git a/tests/snapshots/golden_tests__flatten_rules__bits_dec.hvm.snap b/tests/snapshots/flatten_rules__bits_dec.hvm.snap similarity index 91% rename from tests/snapshots/golden_tests__flatten_rules__bits_dec.hvm.snap rename to tests/snapshots/flatten_rules__bits_dec.hvm.snap index 8bede689..62f89653 100644 --- a/tests/snapshots/golden_tests__flatten_rules__bits_dec.hvm.snap +++ b/tests/snapshots/flatten_rules__bits_dec.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/flatten_rules/bits_dec.hvm --- (Data.Bits.dec Data.Bits.e) = Data.Bits.e (Data.Bits.dec (Data.Bits.o .x0)) = (Data.Bits.dec$0$ .x0) diff --git a/tests/snapshots/golden_tests__flatten_rules__nested_ctrs.hvm.snap b/tests/snapshots/flatten_rules__nested_ctrs.hvm.snap similarity index 80% rename from tests/snapshots/golden_tests__flatten_rules__nested_ctrs.hvm.snap rename to tests/snapshots/flatten_rules__nested_ctrs.hvm.snap index a22f3fe6..47a25081 100644 --- a/tests/snapshots/golden_tests__flatten_rules__nested_ctrs.hvm.snap +++ b/tests/snapshots/flatten_rules__nested_ctrs.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/flatten_rules/nested_ctrs.hvm --- (Rule (CtrA a .x0)) = ((Rule$0$ a) .x0) (Rule (CtrB b)) = b diff --git a/tests/snapshots/golden_tests__compile_file__bad_parens_making_erased_let.hvm.snap b/tests/snapshots/golden_tests__compile_file__bad_parens_making_erased_let.hvm.snap deleted file mode 100644 index d806e8c2..00000000 --- a/tests/snapshots/golden_tests__compile_file__bad_parens_making_erased_let.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -Unbound variable 'two' diff --git a/tests/snapshots/golden_tests__compile_file__hvm1_main.hvm.snap b/tests/snapshots/golden_tests__compile_file__hvm1_main.hvm.snap deleted file mode 100644 index abf9654e..00000000 --- a/tests/snapshots/golden_tests__compile_file__hvm1_main.hvm.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -@main = (a a) - diff --git a/tests/snapshots/golden_tests__compile_term__church_zero.hvm.snap b/tests/snapshots/golden_tests__compile_term__church_zero.hvm.snap deleted file mode 100644 index 838e366a..00000000 --- a/tests/snapshots/golden_tests__compile_term__church_zero.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -(* (a a)) diff --git a/tests/snapshots/golden_tests__compile_term__dup_apply.hvm.snap b/tests/snapshots/golden_tests__compile_term__dup_apply.hvm.snap deleted file mode 100644 index d0fa7d5e..00000000 --- a/tests/snapshots/golden_tests__compile_term__dup_apply.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -({2 (a b) a} b) diff --git a/tests/snapshots/golden_tests__compile_term__erased_dup.hvm.snap b/tests/snapshots/golden_tests__compile_term__erased_dup.hvm.snap deleted file mode 100644 index 5ef59235..00000000 --- a/tests/snapshots/golden_tests__compile_term__erased_dup.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -({2 * a} a) diff --git a/tests/snapshots/golden_tests__compile_term__id.hvm.snap b/tests/snapshots/golden_tests__compile_term__id.hvm.snap deleted file mode 100644 index 80d2c22b..00000000 --- a/tests/snapshots/golden_tests__compile_term__id.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -(a a) diff --git a/tests/snapshots/golden_tests__compile_term__infer_dup.hvm.snap b/tests/snapshots/golden_tests__compile_term__infer_dup.hvm.snap deleted file mode 100644 index 7b2e0443..00000000 --- a/tests/snapshots/golden_tests__compile_term__infer_dup.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -({2 a (a b)} b) diff --git a/tests/snapshots/golden_tests__compile_term__let_substitution.hvm.snap b/tests/snapshots/golden_tests__compile_term__let_substitution.hvm.snap deleted file mode 100644 index 7b2e0443..00000000 --- a/tests/snapshots/golden_tests__compile_term__let_substitution.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -({2 a (a b)} b) diff --git a/tests/snapshots/golden_tests__compile_term__simple_tup.hvm.snap b/tests/snapshots/golden_tests__compile_term__simple_tup.hvm.snap deleted file mode 100644 index 1cf6afb9..00000000 --- a/tests/snapshots/golden_tests__compile_term__simple_tup.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -[#0 #42] diff --git a/tests/snapshots/golden_tests__compile_term__unbound_var.hvm.snap b/tests/snapshots/golden_tests__compile_term__unbound_var.hvm.snap deleted file mode 100644 index 4d1acd83..00000000 --- a/tests/snapshots/golden_tests__compile_term__unbound_var.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -Unbound variable 'a' diff --git a/tests/snapshots/golden_tests__compile_term__unbound_var_scope.hvm.snap b/tests/snapshots/golden_tests__compile_term__unbound_var_scope.hvm.snap deleted file mode 100644 index 3f6b0377..00000000 --- a/tests/snapshots/golden_tests__compile_term__unbound_var_scope.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -Unbound variable 'b' diff --git a/tests/snapshots/golden_tests__readback_lnet__addition.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__addition.hvm.snap deleted file mode 100644 index 19c8e55a..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__addition.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -(+ 2 1) diff --git a/tests/snapshots/golden_tests__readback_lnet__bad_net1.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__bad_net1.hvm.snap deleted file mode 100644 index 959cda95..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__bad_net1.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λa λb a diff --git a/tests/snapshots/golden_tests__readback_lnet__bad_net3.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__bad_net3.hvm.snap deleted file mode 100644 index 959cda95..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__bad_net3.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λa λb a diff --git a/tests/snapshots/golden_tests__readback_lnet__id.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__id.hvm.snap deleted file mode 100644 index 67ce6002..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__id.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λa a diff --git a/tests/snapshots/golden_tests__readback_lnet__number.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__number.hvm.snap deleted file mode 100644 index f4cbeb51..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__number.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -10 diff --git a/tests/snapshots/golden_tests__readback_lnet__simple_tup.hvm.snap b/tests/snapshots/golden_tests__readback_lnet__simple_tup.hvm.snap deleted file mode 100644 index 3d65e858..00000000 --- a/tests/snapshots/golden_tests__readback_lnet__simple_tup.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -(0, 42) diff --git a/tests/snapshots/golden_tests__run_single_files__addition.hvm.snap b/tests/snapshots/golden_tests__run_single_files__addition.hvm.snap deleted file mode 100644 index f4cbeb51..00000000 --- a/tests/snapshots/golden_tests__run_single_files__addition.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -10 diff --git a/tests/snapshots/golden_tests__run_single_files__dup_global_lam.hvm.snap b/tests/snapshots/golden_tests__run_single_files__dup_global_lam.hvm.snap deleted file mode 100644 index 67ce6002..00000000 --- a/tests/snapshots/golden_tests__run_single_files__dup_global_lam.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λa a diff --git a/tests/snapshots/golden_tests__run_single_files__example.hvm.snap b/tests/snapshots/golden_tests__run_single_files__example.hvm.snap deleted file mode 100644 index 5649a7ab..00000000 --- a/tests/snapshots/golden_tests__run_single_files__example.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -8 diff --git a/tests/snapshots/golden_tests__run_single_files__extracted_match_pred.hvm.snap b/tests/snapshots/golden_tests__run_single_files__extracted_match_pred.hvm.snap deleted file mode 100644 index b5d048fe..00000000 --- a/tests/snapshots/golden_tests__run_single_files__extracted_match_pred.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -0 diff --git a/tests/snapshots/golden_tests__run_single_files__match.hvm.snap b/tests/snapshots/golden_tests__run_single_files__match.hvm.snap deleted file mode 100644 index f1f8036a..00000000 --- a/tests/snapshots/golden_tests__run_single_files__match.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λ* λa a diff --git a/tests/snapshots/golden_tests__run_single_files__pred.hvm.snap b/tests/snapshots/golden_tests__run_single_files__pred.hvm.snap deleted file mode 100644 index a9673b86..00000000 --- a/tests/snapshots/golden_tests__run_single_files__pred.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -2 diff --git a/tests/snapshots/golden_tests__run_single_files__readback_hvm1_main.hvm.snap b/tests/snapshots/golden_tests__run_single_files__readback_hvm1_main.hvm.snap deleted file mode 100644 index 4a61d29d..00000000 --- a/tests/snapshots/golden_tests__run_single_files__readback_hvm1_main.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λ* λ* Main diff --git a/tests/snapshots/golden_tests__run_single_files__readback_hvm2_main.hvm.snap b/tests/snapshots/golden_tests__run_single_files__readback_hvm2_main.hvm.snap deleted file mode 100644 index 0d625800..00000000 --- a/tests/snapshots/golden_tests__run_single_files__readback_hvm2_main.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λ* λ* main diff --git a/tests/snapshots/golden_tests__run_single_files__unused_dup_var.hvm.snap b/tests/snapshots/golden_tests__run_single_files__unused_dup_var.hvm.snap deleted file mode 100644 index b7795aea..00000000 --- a/tests/snapshots/golden_tests__run_single_files__unused_dup_var.hvm.snap +++ /dev/null @@ -1,5 +0,0 @@ ---- -source: tests/golden_tests.rs -expression: result ---- -λa (a λb b) diff --git a/tests/snapshots/readback_lnet__addition.hvm.snap b/tests/snapshots/readback_lnet__addition.hvm.snap new file mode 100644 index 00000000..d2f6c689 --- /dev/null +++ b/tests/snapshots/readback_lnet__addition.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/addition.hvm +--- +(+ 2 1) diff --git a/tests/snapshots/golden_tests__readback_lnet__bad_net.hvm.snap b/tests/snapshots/readback_lnet__bad_net.hvm.snap similarity index 50% rename from tests/snapshots/golden_tests__readback_lnet__bad_net.hvm.snap rename to tests/snapshots/readback_lnet__bad_net.hvm.snap index 60304787..d65c28f2 100644 --- a/tests/snapshots/golden_tests__readback_lnet__bad_net.hvm.snap +++ b/tests/snapshots/readback_lnet__bad_net.hvm.snap @@ -1,6 +1,6 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/bad_net.hvm --- Invalid readback: * diff --git a/tests/snapshots/readback_lnet__bad_net1.hvm.snap b/tests/snapshots/readback_lnet__bad_net1.hvm.snap new file mode 100644 index 00000000..1ffd47f4 --- /dev/null +++ b/tests/snapshots/readback_lnet__bad_net1.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/bad_net1.hvm +--- +λa λb a diff --git a/tests/snapshots/readback_lnet__bad_net3.hvm.snap b/tests/snapshots/readback_lnet__bad_net3.hvm.snap new file mode 100644 index 00000000..849401fd --- /dev/null +++ b/tests/snapshots/readback_lnet__bad_net3.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/bad_net3.hvm +--- +λa λb a diff --git a/tests/snapshots/golden_tests__readback_lnet__complicated_dup.hvm.snap b/tests/snapshots/readback_lnet__complicated_dup.hvm.snap similarity index 52% rename from tests/snapshots/golden_tests__readback_lnet__complicated_dup.hvm.snap rename to tests/snapshots/readback_lnet__complicated_dup.hvm.snap index f86c325a..4164310b 100644 --- a/tests/snapshots/golden_tests__readback_lnet__complicated_dup.hvm.snap +++ b/tests/snapshots/readback_lnet__complicated_dup.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/complicated_dup.hvm --- λa (λb (a (b c)) λc (a (b c))) diff --git a/tests/snapshots/golden_tests__readback_lnet__fst_snd.hvm.snap b/tests/snapshots/readback_lnet__fst_snd.hvm.snap similarity index 63% rename from tests/snapshots/golden_tests__readback_lnet__fst_snd.hvm.snap rename to tests/snapshots/readback_lnet__fst_snd.hvm.snap index d9025f4d..62a9f492 100644 --- a/tests/snapshots/golden_tests__readback_lnet__fst_snd.hvm.snap +++ b/tests/snapshots/readback_lnet__fst_snd.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/fst_snd.hvm --- let (*, b) = a; let (d, *) = c; (λa b (λc d ((1, 3), 2))) diff --git a/tests/snapshots/readback_lnet__id.hvm.snap b/tests/snapshots/readback_lnet__id.hvm.snap new file mode 100644 index 00000000..5366ef3f --- /dev/null +++ b/tests/snapshots/readback_lnet__id.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/id.hvm +--- +λa a diff --git a/tests/snapshots/golden_tests__readback_lnet__match.hvm.snap b/tests/snapshots/readback_lnet__match.hvm.snap similarity index 54% rename from tests/snapshots/golden_tests__readback_lnet__match.hvm.snap rename to tests/snapshots/readback_lnet__match.hvm.snap index 6482665a..092fa481 100644 --- a/tests/snapshots/golden_tests__readback_lnet__match.hvm.snap +++ b/tests/snapshots/readback_lnet__match.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/match.hvm --- match 1 { 0: λa a; 1+b: b } diff --git a/tests/snapshots/golden_tests__readback_lnet__nested_let.hvm.snap b/tests/snapshots/readback_lnet__nested_let.hvm.snap similarity index 59% rename from tests/snapshots/golden_tests__readback_lnet__nested_let.hvm.snap rename to tests/snapshots/readback_lnet__nested_let.hvm.snap index 22f67c36..e249e022 100644 --- a/tests/snapshots/golden_tests__readback_lnet__nested_let.hvm.snap +++ b/tests/snapshots/readback_lnet__nested_let.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/nested_let.hvm --- let (c, b) = ((2, 4), (3, 6)); let (a, *) = b; a diff --git a/tests/snapshots/golden_tests__readback_lnet__nested_tup.hvm.snap b/tests/snapshots/readback_lnet__nested_tup.hvm.snap similarity index 50% rename from tests/snapshots/golden_tests__readback_lnet__nested_tup.hvm.snap rename to tests/snapshots/readback_lnet__nested_tup.hvm.snap index 37142702..0691c14e 100644 --- a/tests/snapshots/golden_tests__readback_lnet__nested_tup.hvm.snap +++ b/tests/snapshots/readback_lnet__nested_tup.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/nested_tup.hvm --- ((1, 2), (4, (3, 5))) diff --git a/tests/snapshots/readback_lnet__number.hvm.snap b/tests/snapshots/readback_lnet__number.hvm.snap new file mode 100644 index 00000000..ed03c2dd --- /dev/null +++ b/tests/snapshots/readback_lnet__number.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/number.hvm +--- +10 diff --git a/tests/snapshots/readback_lnet__simple_tup.hvm.snap b/tests/snapshots/readback_lnet__simple_tup.hvm.snap new file mode 100644 index 00000000..e4e3ee15 --- /dev/null +++ b/tests/snapshots/readback_lnet__simple_tup.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/readback_lnet/simple_tup.hvm +--- +(0, 42) diff --git a/tests/snapshots/golden_tests__readback_lnet__tup_add.hvm.snap b/tests/snapshots/readback_lnet__tup_add.hvm.snap similarity index 54% rename from tests/snapshots/golden_tests__readback_lnet__tup_add.hvm.snap rename to tests/snapshots/readback_lnet__tup_add.hvm.snap index bcd75c21..d1d3b1c8 100644 --- a/tests/snapshots/golden_tests__readback_lnet__tup_add.hvm.snap +++ b/tests/snapshots/readback_lnet__tup_add.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/readback_lnet/tup_add.hvm --- let (a, b) = (1, 2); (+ a b) diff --git a/tests/snapshots/run_single_files__addition.hvm.snap b/tests/snapshots/run_single_files__addition.hvm.snap new file mode 100644 index 00000000..61d11579 --- /dev/null +++ b/tests/snapshots/run_single_files__addition.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/addition.hvm +--- +10 diff --git a/tests/snapshots/run_single_files__dup_global_lam.hvm.snap b/tests/snapshots/run_single_files__dup_global_lam.hvm.snap new file mode 100644 index 00000000..e60f285f --- /dev/null +++ b/tests/snapshots/run_single_files__dup_global_lam.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/dup_global_lam.hvm +--- +λa a diff --git a/tests/snapshots/golden_tests__run_single_files__empty.hvm.snap b/tests/snapshots/run_single_files__empty.hvm.snap similarity index 53% rename from tests/snapshots/golden_tests__run_single_files__empty.hvm.snap rename to tests/snapshots/run_single_files__empty.hvm.snap index d68b5d62..f8291aae 100644 --- a/tests/snapshots/golden_tests__run_single_files__empty.hvm.snap +++ b/tests/snapshots/run_single_files__empty.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/run_single_files/empty.hvm --- File has no 'main' definition diff --git a/tests/snapshots/run_single_files__example.hvm.snap b/tests/snapshots/run_single_files__example.hvm.snap new file mode 100644 index 00000000..6553575e --- /dev/null +++ b/tests/snapshots/run_single_files__example.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/example.hvm +--- +8 diff --git a/tests/snapshots/run_single_files__extracted_match_pred.hvm.snap b/tests/snapshots/run_single_files__extracted_match_pred.hvm.snap new file mode 100644 index 00000000..6fc56df8 --- /dev/null +++ b/tests/snapshots/run_single_files__extracted_match_pred.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/extracted_match_pred.hvm +--- +0 diff --git a/tests/snapshots/run_single_files__match.hvm.snap b/tests/snapshots/run_single_files__match.hvm.snap new file mode 100644 index 00000000..60436d9a --- /dev/null +++ b/tests/snapshots/run_single_files__match.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/match.hvm +--- +λ* λa a diff --git a/tests/snapshots/run_single_files__pred.hvm.snap b/tests/snapshots/run_single_files__pred.hvm.snap new file mode 100644 index 00000000..633a2ce3 --- /dev/null +++ b/tests/snapshots/run_single_files__pred.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/pred.hvm +--- +2 diff --git a/tests/snapshots/golden_tests__run_single_files__queue.hvm.snap b/tests/snapshots/run_single_files__queue.hvm.snap similarity index 62% rename from tests/snapshots/golden_tests__run_single_files__queue.hvm.snap rename to tests/snapshots/run_single_files__queue.hvm.snap index ce613ff8..86aca92f 100644 --- a/tests/snapshots/golden_tests__run_single_files__queue.hvm.snap +++ b/tests/snapshots/run_single_files__queue.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/run_single_files/queue.hvm --- λa λ* ((a 1) λb λ* ((b 2) λc λ* ((c 3) λ* λd d))) diff --git a/tests/snapshots/run_single_files__readback_hvm1_main.hvm.snap b/tests/snapshots/run_single_files__readback_hvm1_main.hvm.snap new file mode 100644 index 00000000..e61f172e --- /dev/null +++ b/tests/snapshots/run_single_files__readback_hvm1_main.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/readback_hvm1_main.hvm +--- +λ* λ* Main diff --git a/tests/snapshots/run_single_files__readback_hvm2_main.hvm.snap b/tests/snapshots/run_single_files__readback_hvm2_main.hvm.snap new file mode 100644 index 00000000..1d9d6ca7 --- /dev/null +++ b/tests/snapshots/run_single_files__readback_hvm2_main.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/readback_hvm2_main.hvm +--- +λ* λ* main diff --git a/tests/snapshots/golden_tests__run_single_files__repeated_name_trucation.hvm.snap b/tests/snapshots/run_single_files__repeated_name_trucation.hvm.snap similarity index 52% rename from tests/snapshots/golden_tests__run_single_files__repeated_name_trucation.hvm.snap rename to tests/snapshots/run_single_files__repeated_name_trucation.hvm.snap index 895a2ec8..fbccb6bb 100644 --- a/tests/snapshots/golden_tests__run_single_files__repeated_name_trucation.hvm.snap +++ b/tests/snapshots/run_single_files__repeated_name_trucation.hvm.snap @@ -1,5 +1,5 @@ --- source: tests/golden_tests.rs -expression: result +input_file: tests/golden_tests/run_single_files/repeated_name_trucation.hvm --- λ* λ* main_long_name_that_truncates_to_main diff --git a/tests/snapshots/run_single_files__unused_dup_var.hvm.snap b/tests/snapshots/run_single_files__unused_dup_var.hvm.snap new file mode 100644 index 00000000..de815c7c --- /dev/null +++ b/tests/snapshots/run_single_files__unused_dup_var.hvm.snap @@ -0,0 +1,5 @@ +--- +source: tests/golden_tests.rs +input_file: tests/golden_tests/run_single_files/unused_dup_var.hvm +--- +λa (a λb b)