feat: add trace
This commit is contained in:
5
examples/acceptance_tests/032/aiken.lock
Normal file
5
examples/acceptance_tests/032/aiken.lock
Normal file
@@ -0,0 +1,5 @@
|
||||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
requirements = []
|
||||
packages = []
|
||||
@@ -1,2 +1,2 @@
|
||||
name = "acceptance_test_032"
|
||||
name = "aiken-lang/acceptance_test_032"
|
||||
version = "0.0.0"
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
use aiken/builtin
|
||||
|
||||
fn is_negative(i : Int) -> Bool {
|
||||
fn is_negative(i: Int) -> Bool {
|
||||
if i < 0 {
|
||||
builtin.trace("is negative", True)
|
||||
trace("is negative")
|
||||
|
||||
True
|
||||
} else {
|
||||
builtin.trace("is non-negative", False)
|
||||
trace("is non-negative")
|
||||
|
||||
False
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
test trace_1() {
|
||||
is_negative(-14) && !is_negative(42)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user