Add new uplc case to test, it is failing

This commit is contained in:
Turner 2022-06-19 22:33:24 -07:00 committed by Lucas
parent 5ba7349f4a
commit 787f345275
3 changed files with 85 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,77 @@
(program
1.0.0
[
(lam
i0
[
[
(force
(force
(delay
(delay
(lam
f
[
(force (delay (lam s [ s s ])))
(lam
s
(lam
x [ [ f [ (force (delay (lam s [ s s ]))) s ] ] x ]
)
)
]
)
)
)
)
)
(lam
rec
(lam
i
[
[
[
(force
(delay
(lam
b
(lam
x
(lam
y
[
[ [ [ (force (builtin ifThenElse)) b ] x ] y ]
(con unit ())
]
)
)
)
)
)
[ [ (builtin lessThanEqualsInteger) i ] (con integer 1) ]
]
(lam u i)
]
(lam
u
[
[
(builtin addInteger)
[
rec [ [ (builtin subtractInteger) i ] (con integer 1) ]
]
]
[ rec [ [ (builtin subtractInteger) i ] (con integer 2) ] ]
]
)
]
)
)
]
i0
]
)
(con integer 0)
]
)

View File

@ -65,3 +65,11 @@ fn jpg() {
round_trip_test(bytes, code); round_trip_test(bytes, code);
} }
#[test]
fn fibonacci() {
let bytes = include_bytes!("../test_data/fibonacci/fibonacci.flat");
let code = include_str!("../test_data/fibonacci/fibonacci.uplc");
round_trip_test(bytes, code);
}