mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-19 07:37:56 +03:00
improve tests settings
This commit is contained in:
parent
7530cea3d5
commit
00e87e6502
@ -33,7 +33,7 @@ fn do_parse_net(code: &str) -> Result<hvmc::ast::Net, String> {
|
||||
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(())
|
||||
}
|
||||
|
||||
|
@ -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)
|
@ -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
|
@ -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
|
@ -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
|
@ -1 +0,0 @@
|
||||
Non-exhaustive pattern at definition 'Foo'. Argument 2 of type 'Type' does not cover the 'A' constructor
|
@ -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
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/adt_generation/common.hvm
|
||||
---
|
||||
(True) = λTrue λFalse True
|
||||
|
@ -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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/adt_generation/weekday.hvm
|
||||
---
|
||||
(main) = (λx x Saturday)
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/compile_file/addition.hvm
|
||||
---
|
||||
@2 = (a b)
|
||||
& <c <a b>> ~ #1
|
@ -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'
|
@ -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)
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/compile_file/cyclic_dup.hvm
|
||||
---
|
||||
Unbound variable 'y1'
|
@ -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
|
@ -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))
|
@ -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)
|
@ -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)
|
@ -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)))))))))))))
|
@ -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
|
6
tests/snapshots/compile_file__hvm1_main.hvm.snap
Normal file
6
tests/snapshots/compile_file__hvm1_main.hvm.snap
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_file/hvm1_main.hvm
|
||||
---
|
||||
@main = (a a)
|
||||
|
@ -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)
|
@ -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)
|
@ -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
|
@ -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
|
@ -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)
|
@ -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
|
@ -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
|
@ -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)
|
@ -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)
|
@ -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)
|
@ -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))
|
@ -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)
|
@ -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)))
|
5
tests/snapshots/compile_term__church_zero.hvm.snap
Normal file
5
tests/snapshots/compile_term__church_zero.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/church_zero.hvm
|
||||
---
|
||||
(* (a a))
|
@ -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)
|
@ -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
|
5
tests/snapshots/compile_term__dup_apply.hvm.snap
Normal file
5
tests/snapshots/compile_term__dup_apply.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/dup_apply.hvm
|
||||
---
|
||||
({2 (a b) a} b)
|
@ -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))
|
5
tests/snapshots/compile_term__erased_dup.hvm.snap
Normal file
5
tests/snapshots/compile_term__erased_dup.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/erased_dup.hvm
|
||||
---
|
||||
({2 * a} a)
|
@ -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)
|
@ -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))
|
5
tests/snapshots/compile_term__id.hvm.snap
Normal file
5
tests/snapshots/compile_term__id.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/id.hvm
|
||||
---
|
||||
(a a)
|
5
tests/snapshots/compile_term__infer_dup.hvm.snap
Normal file
5
tests/snapshots/compile_term__infer_dup.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/infer_dup.hvm
|
||||
---
|
||||
({2 a (a b)} b)
|
5
tests/snapshots/compile_term__let_substitution.hvm.snap
Normal file
5
tests/snapshots/compile_term__let_substitution.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/let_substitution.hvm
|
||||
---
|
||||
({2 a (a b)} b)
|
@ -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))]
|
@ -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)
|
@ -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
|
@ -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]]
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/compile_term/op2.hvm
|
||||
---
|
||||
a
|
||||
& <b <#11 a>> ~ #1
|
5
tests/snapshots/compile_term__simple_tup.hvm.snap
Normal file
5
tests/snapshots/compile_term__simple_tup.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/simple_tup.hvm
|
||||
---
|
||||
[#0 #42]
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/compile_term/tup.hvm
|
||||
---
|
||||
[[#1 #4] [#2 #3]]
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/compile_term/tup_add.hvm
|
||||
---
|
||||
a
|
||||
& <b <c a>> ~ #1
|
5
tests/snapshots/compile_term__unbound_var.hvm.snap
Normal file
5
tests/snapshots/compile_term__unbound_var.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/unbound_var.hvm
|
||||
---
|
||||
Unbound variable 'a'
|
5
tests/snapshots/compile_term__unbound_var_scope.hvm.snap
Normal file
5
tests/snapshots/compile_term__unbound_var_scope.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/compile_term/unbound_var_scope.hvm
|
||||
---
|
||||
Unbound variable 'b'
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/flatten_rules/already_flat.hvm
|
||||
---
|
||||
(Rule1) = λx x
|
||||
|
@ -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)
|
@ -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
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
Unbound variable 'two'
|
@ -1,6 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
@main = (a a)
|
||||
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
(* (a a))
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
({2 (a b) a} b)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
({2 * a} a)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
(a a)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
({2 a (a b)} b)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
({2 a (a b)} b)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
[#0 #42]
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
Unbound variable 'a'
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
Unbound variable 'b'
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
(+ 2 1)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λa λb a
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λa λb a
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λa a
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
10
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
(0, 42)
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
10
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λa a
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
8
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
0
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λ* λa a
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
2
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λ* λ* Main
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λ* λ* main
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
---
|
||||
λa (a λb b)
|
5
tests/snapshots/readback_lnet__addition.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__addition.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/addition.hvm
|
||||
---
|
||||
(+ 2 1)
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
expression: result
|
||||
input_file: tests/golden_tests/readback_lnet/bad_net.hvm
|
||||
---
|
||||
Invalid readback:
|
||||
*
|
5
tests/snapshots/readback_lnet__bad_net1.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__bad_net1.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/bad_net1.hvm
|
||||
---
|
||||
λa λb a
|
5
tests/snapshots/readback_lnet__bad_net3.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__bad_net3.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/bad_net3.hvm
|
||||
---
|
||||
λa λb a
|
@ -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)))
|
@ -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)))
|
5
tests/snapshots/readback_lnet__id.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__id.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/id.hvm
|
||||
---
|
||||
λa a
|
@ -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 }
|
@ -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
|
@ -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)))
|
5
tests/snapshots/readback_lnet__number.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__number.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/number.hvm
|
||||
---
|
||||
10
|
5
tests/snapshots/readback_lnet__simple_tup.hvm.snap
Normal file
5
tests/snapshots/readback_lnet__simple_tup.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/readback_lnet/simple_tup.hvm
|
||||
---
|
||||
(0, 42)
|
@ -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)
|
5
tests/snapshots/run_single_files__addition.hvm.snap
Normal file
5
tests/snapshots/run_single_files__addition.hvm.snap
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/run_single_files/addition.hvm
|
||||
---
|
||||
10
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
source: tests/golden_tests.rs
|
||||
input_file: tests/golden_tests/run_single_files/dup_global_lam.hvm
|
||||
---
|
||||
λa a
|
@ -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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user