leo/tests/compiler/string/equality.leo

17 lines
427 B
Plaintext
Raw Normal View History

/*
namespace: Compile
expectation: Pass
input_file:
- inputs/string.in
2021-05-23 00:57:05 +03:00
- inputs/weird.in
*/
function main(s1: [char; 13], s2: [char; 4]) -> bool {
let hello: [char; 13] = "Hello, World!";
let part1 = "Good";
let part2 = " dog!";
let concat: [char; 9] = [...part1, ...part2];
let x = false;
x = "test1" == "test2";
return hello == s1 && "nope" != s2 && "es" == s2[1..3] && concat == "Good dog!";
}