Skip to content

Commit

Permalink
Update tests for non-optimizing compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
developedby committed Jan 12, 2024
1 parent fb9bb93 commit 89b0c80
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/snapshots/compile_file_o0__addition_const.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file_o0/addition_const.hvm
---
@SCons = (a (b {2 {6 a {4 b c}} {2 * c}}))
@SNil = {2 * {2 a a}}
@main = #3

2 changes: 2 additions & 0 deletions tests/snapshots/compile_file_o0__redex_order.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file_o0/redex_order.hvm
---
@SCons = (a (b {2 {6 a {4 b c}} {2 * c}}))
@SNil = {2 * {2 a a}}
@a = (a a)
@b = (a a)
@c = (a a)
Expand Down
10 changes: 9 additions & 1 deletion tests/snapshots/compile_file_o0__ref_to_ref.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_file_o0/ref_to_ref.hvm
---
@A1 = @A2
@A2 = #1
@B1 = @B2
@B2 = @B3
@B3 = @B4
@B4 = @B5
@B5 = #2
@main = [[@A2 @B5] @B5]
@C1 = @B4
@SCons = (a (b {2 {6 a {4 b c}} {2 * c}}))
@SNil = {2 * {2 a a}}
@main = [[@A1 @B1] @C1]

4 changes: 4 additions & 0 deletions tests/snapshots/encode_pattern_match__adt_tup_era.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ input_file: tests/golden_tests/encode_pattern_match/adt_tup_era.hvm

(Main) = (Foo (Pair 1 5))

(SCons) = λhead λtail #String λSCons #String λSNil #String.SCons.tail (#String.SCons.head (SCons head) tail)

(SNil) = #String λSCons #String λSNil SNil

(Pair) = λa λb #Tuple λPair #Tuple.Pair.b (#Tuple.Pair.a (Pair a) b)

(Foo$F0) = λx #Tuple (x Foo$F0$PPair)
Expand Down
4 changes: 4 additions & 0 deletions tests/snapshots/encode_pattern_match__bool_tup.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ input_file: tests/golden_tests/encode_pattern_match/bool_tup.hvm

(F) = #Bool λT #Bool λF F

(SCons) = λhead λtail #String λSCons #String λSNil #String.SCons.tail (#String.SCons.head (SCons head) tail)

(SNil) = #String λSCons #String λSNil SNil

(foo$F0) = λx #Bool (x foo$F0$PT foo$F0$PF)

(foo$R0) = λ%0 let (x$0, x$1) = %0; (foo$F0 x$0 x$1)
Expand Down
4 changes: 4 additions & 0 deletions tests/snapshots/encode_pattern_match__is_some_some.hvm.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ input_file: tests/golden_tests/encode_pattern_match/is_some_some.hvm

(None) = #Option λSome #Option λNone None

(SCons) = λhead λtail #String λSCons #String λSNil #String.SCons.tail (#String.SCons.head (SCons head) tail)

(SNil) = #String λSCons #String λSNil SNil

(some_some$F0) = λx #Option (x some_some$F0$PSome some_some$F0$PNone)

(some_some$R0) = λx$0 (some_some$F0 x$0)
Expand Down

0 comments on commit 89b0c80

Please sign in to comment.