Skip to content

Commit

Permalink
Add debug flag cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
imaqtkatt committed Mar 12, 2024
1 parent 2f0c3de commit 85c5c45
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/golden_tests/cli/debug_u60_to_nat.args
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
run
tests/golden_tests/cli/debug_u60_to_nat.hvm
-d
4
6 changes: 6 additions & 0 deletions tests/golden_tests/cli/debug_u60_to_nat.hvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
data Nat = (Z) | (S nat)

(U60ToNat 0) = Z
(U60ToNat 1+p) = (S (U60ToNat p))

(Main n) = (U60ToNat n)
33 changes: 33 additions & 0 deletions tests/snapshots/cli__debug_u60_to_nat.hvm.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
source: tests/golden_tests.rs
input_file: tests/golden_tests/cli/debug_u60_to_nat.hvm
---
a (U60ToNat a) 4)
---------------------------------------
(U60ToNat 4)
---------------------------------------
a (S (U60ToNat a)) 3)
---------------------------------------
(S (U60ToNat 3))
---------------------------------------
(Sa (S (U60ToNat a)) 2))
---------------------------------------
(S (S (U60ToNat 2)))
---------------------------------------
(S (Sa (S (U60ToNat a)) 1)))
---------------------------------------
(S (S (S (U60ToNat 1))))
---------------------------------------
(S (S (Sa (S (U60ToNat a)) 0))))
---------------------------------------
(S (S (S (S (U60ToNat 0)))))
---------------------------------------
(S (S (S (S Z))))
---------------------------------------
(S (S (S #Nat λ* #Nat λa #Nat (a Z))))
---------------------------------------
(S (S #Nat λ* #Nat λa #Nat (a #Nat λ* #Nat λb #Nat (b Z))))
---------------------------------------
(S #Nat λ* #Nat λa #Nat (a #Nat λ* #Nat λb #Nat (b #Nat λ* #Nat λc #Nat (c Z))))
---------------------------------------
(S (S (S (S Z))))

0 comments on commit 85c5c45

Please sign in to comment.