Add tests for all valid expressions
This commit is contained in:
parent
98c521d90a
commit
c6bdb15693
@ -222,6 +222,7 @@ compilable_contracts() ->
|
|||||||
"unapplied_contract_call",
|
"unapplied_contract_call",
|
||||||
"unapplied_named_arg_builtin",
|
"unapplied_named_arg_builtin",
|
||||||
"resolve_field_constraint_by_arity",
|
"resolve_field_constraint_by_arity",
|
||||||
|
"toplevel_constants",
|
||||||
"test" % Custom general-purpose test file. Keep it last on the list.
|
"test" % Custom general-purpose test file. Keep it last on the list.
|
||||||
].
|
].
|
||||||
|
|
||||||
|
49
test/contracts/toplevel_constants.aes
Normal file
49
test/contracts/toplevel_constants.aes
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
contract C =
|
||||||
|
datatype event = EventX(int, string)
|
||||||
|
|
||||||
|
record account = { name : string,
|
||||||
|
balance : int }
|
||||||
|
|
||||||
|
let c01 = 2425
|
||||||
|
let c02 = -5
|
||||||
|
let c03 = ak_2gx9MEFxKvY9vMG5YnqnXWv1hCsX7rgnfvBLJS4aQurustR1rt
|
||||||
|
let c04 = true
|
||||||
|
let c05 = Bits.none
|
||||||
|
let c06 = #fedcba9876543210
|
||||||
|
let c07 = "str"
|
||||||
|
let c08 = [1, 2, 3]
|
||||||
|
let c09 = [(true, 24), (false, 19), (false, -42)]
|
||||||
|
let c10 = (42, "Foo", true)
|
||||||
|
let c11 = { name = "str", balance = 100000000 }
|
||||||
|
let c12 = {["foo"] = 19, ["bar"] = 42}
|
||||||
|
let c13 = Some(42)
|
||||||
|
let c14 = 11 : int
|
||||||
|
let c15 = EventX(0, "Hello")
|
||||||
|
let c16 = #000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f
|
||||||
|
let c17 = #000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f
|
||||||
|
let c18 = RelativeTTL(50)
|
||||||
|
let c19 = ok_2YNyxd6TRJPNrTcEDCe9ra59SVUdp9FR9qWC5msKZWYD9bP9z5
|
||||||
|
let c20 = oq_2oRvyowJuJnEkxy58Ckkw77XfWJrmRgmGaLzhdqb67SKEL1gPY
|
||||||
|
let c21 = ct_Ez6MyeTMm17YnTnDdHTSrzMEBKmy7Uz2sXu347bTDPgVH2ifJ : C
|
||||||
|
|
||||||
|
entrypoint f01() = c01
|
||||||
|
entrypoint f02() = c02
|
||||||
|
entrypoint f03() = c03
|
||||||
|
entrypoint f04() = c04
|
||||||
|
entrypoint f05() = c05
|
||||||
|
entrypoint f06() = c06
|
||||||
|
entrypoint f07() = c07
|
||||||
|
entrypoint f08() = c08
|
||||||
|
entrypoint f09() = c09
|
||||||
|
entrypoint f10() = c10
|
||||||
|
entrypoint f11() = c11
|
||||||
|
entrypoint f12() = c12
|
||||||
|
entrypoint f13() = c13
|
||||||
|
entrypoint f14() = c14
|
||||||
|
entrypoint f15() = c15
|
||||||
|
entrypoint f16() = c16
|
||||||
|
entrypoint f17() = c17
|
||||||
|
entrypoint f18() = c18
|
||||||
|
entrypoint f19() = c19
|
||||||
|
entrypoint f20() = c20
|
||||||
|
entrypoint f21() = c21
|
Loading…
x
Reference in New Issue
Block a user