mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-20 08:01:42 +03:00
adds char and string tests for inputs and const inputs
This commit is contained in:
parent
f36d9b960f
commit
8959d3e44b
@ -0,0 +1,6 @@
|
||||
[main]
|
||||
y: bool = true;
|
||||
a: char = '👍';
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
@ -0,0 +1,6 @@
|
||||
[main]
|
||||
y: bool = true;
|
||||
a: [char; 5] = "😭😂👍😁😘";
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
13
tests/compiler/input_files/program_input/main_char.leo
Normal file
13
tests/compiler/input_files/program_input/main_char.leo
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
input_file: input/main_char.in
|
||||
*/
|
||||
|
||||
function main(a: char, y: bool) -> bool {
|
||||
// Change to assert when == is implemented for field.
|
||||
console.log("a: {}", a);
|
||||
console.log("b: {}", b);
|
||||
|
||||
return y == true && a == '👍';
|
||||
}
|
13
tests/compiler/input_files/program_input/main_string.leo
Normal file
13
tests/compiler/input_files/program_input/main_string.leo
Normal file
@ -0,0 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
input_file: input/main_string.in
|
||||
*/
|
||||
|
||||
function main(a: [char; 5], y: bool) -> bool {
|
||||
// Change to assert when == is implemented for field.
|
||||
console.log("a: {}", a);
|
||||
console.log("b: {}", b);
|
||||
|
||||
return y == true && a == "😭😂👍😁😘";
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
[main]
|
||||
y: bool = true;
|
||||
|
||||
[constants]
|
||||
a: char = '👍';
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
@ -0,0 +1,8 @@
|
||||
[main]
|
||||
y: bool = true;
|
||||
|
||||
[constants]
|
||||
a: [char; 5] = "😭😂👍😁😘";
|
||||
|
||||
[registers]
|
||||
r0: bool = true;
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
input_file: input/main_char.in
|
||||
*/
|
||||
|
||||
function main(const a: char, y: bool) -> bool {
|
||||
// Change to assert when == is implemented for field.
|
||||
console.log("a: {}", a);
|
||||
console.log("b: {}", b);
|
||||
|
||||
return y == true && a == '👍';
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
input_file: input/main_string.in
|
||||
*/
|
||||
|
||||
function main(const a: [char; 5], y: bool) -> bool {
|
||||
// Change to assert when == is implemented for field.
|
||||
console.log("a: {}", a);
|
||||
console.log("b: {}", b);
|
||||
|
||||
return y == true && a == "😭😂👍😁😘";
|
||||
}
|
Loading…
Reference in New Issue
Block a user