adds char and string tests for inputs and const inputs

This commit is contained in:
damirka 2021-05-25 20:59:24 +03:00
parent f36d9b960f
commit 8959d3e44b
8 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,6 @@
[main]
y: bool = true;
a: char = '👍';
[registers]
r0: bool = true;

View File

@ -0,0 +1,6 @@
[main]
y: bool = true;
a: [char; 5] = "😭😂👍😁😘";
[registers]
r0: bool = true;

View 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 == '👍';
}

View 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 == "😭😂👍😁😘";
}

View File

@ -0,0 +1,8 @@
[main]
y: bool = true;
[constants]
a: char = '👍';
[registers]
r0: bool = true;

View File

@ -0,0 +1,8 @@
[main]
y: bool = true;
[constants]
a: [char; 5] = "😭😂👍😁😘";
[registers]
r0: bool = true;

View File

@ -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 == '👍';
}

View File

@ -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 == "😭😂👍😁😘";
}