mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-24 19:03:27 +03:00
more tests
This commit is contained in:
parent
af1aca3d9f
commit
957d73f33f
@ -0,0 +1,11 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
input_file: input/different_types_signed_fail.in
|
||||
input_file: input/different_types_const_signed_fail.in
|
||||
input_file: input/main_fail_type.in
|
||||
*/
|
||||
|
||||
function main(const a: i32) {
|
||||
let b = a * 2;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
input_file: input/different_types_const_unsigned_fail.in
|
||||
input_file: input/different_types_unsigned_fail.in
|
||||
input_file: input/main_fail_type.in
|
||||
*/
|
||||
|
||||
function main(const a: u32) {
|
||||
let b = a * 2;
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
input_file: input/different_types_fail.in
|
||||
input_file: input/main_fail_type.in
|
||||
*/
|
||||
|
||||
function main(a: u32) {
|
||||
let b = a * 2;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
input_file: input/different_types_signed_fail.in
|
||||
input_file: input/different_types_const_signed_fail.in
|
||||
input_file: input/var_in_both_sections_fail.in
|
||||
*/
|
||||
|
||||
function main(a: i32) {
|
||||
let b = a * 2;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
input_file: input/different_types_const_unsigned_fail.in
|
||||
input_file: input/different_types_unsigned_fail.in
|
||||
input_file: input/var_in_both_sections_fail.in
|
||||
*/
|
||||
|
||||
function main(a: u32) {
|
||||
let b = a * 2;
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
[constants]
|
||||
a: i32 = 2i8;
|
@ -0,0 +1,2 @@
|
||||
[main]
|
||||
a: i32 = 2i8;
|
@ -0,0 +1,2 @@
|
||||
[constants]
|
||||
a: u32 = 2u8;
|
@ -0,0 +1,5 @@
|
||||
[main]
|
||||
a: u32 = 2u32;
|
||||
|
||||
[constants]
|
||||
a: u32 = 2u32;
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> compiler-test:3:21\n |\n 3 | function main(const a: i32) {\n | ^\n |\n = Expected input variable `a` to be constant. Move input variable `a` to [constants] section of input file"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> compiler-test:3:21\n |\n 3 | function main(const a: u32) {\n | ^\n |\n = Expected input variable `a` to be constant. Move input variable `a` to [constants] section of input file"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> compiler-test:3:15\n |\n 3 | function main(a: i32) {\n | ^\n |\n = Input variable a declared twice"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Fail
|
||||
outputs:
|
||||
- " --> compiler-test:3:15\n |\n 3 | function main(a: u32) {\n | ^\n |\n = Input variable a declared twice"
|
Loading…
Reference in New Issue
Block a user