mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-27 20:24:52 +03:00
add const test
This commit is contained in:
parent
acf5e1dc08
commit
a39197af62
9
tests/compiler/statements/ternary_non_const_fail.leo
Normal file
9
tests/compiler/statements/ternary_non_const_fail.leo
Normal file
@ -0,0 +1,9 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
*/
|
||||
|
||||
function main() {
|
||||
let x = 3u8;
|
||||
const y = x > 2u8? 1u8 : 2u8;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> /Users/dam/projects/aleo/leo/test-framework/../tests/compiler/statements/ternary_non_const_fail.leo:5:5\n |\n 5 | const y = x > 2u8? 1u8 : 2u8;\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n |\n = failed to create const variable(s) 'y' with non constant values."
|
Loading…
Reference in New Issue
Block a user