lama_byterun/stdlib/regression/test03.expr

34 lines
894 B
Text
Raw Normal View History

2019-12-20 00:23:35 +03:00
fun f (x) {
return fun (y) {return x + y}
}
write (compare (1, 2));
write (compare (2, 1));
write (compare (3, 3));
write (compare (2, "abc"));
write (compare ("abc", 2));
write (compare ("abc", "abc"));
write (compare ("ab", "abc"));
write (compare ("abc", "ab"));
write (compare ([], []));
write (compare (A, A));
write (compare (A, B));
write (compare (B, A));
write (compare (A (1), A (1, 1)));
write (compare (A (1, 1), A (1)));
-- not stable: write (compare (f, f));
-- not stable: write (compare (f, f(5)));
-- not stable: write (compare (f(5), f));
-- not stable: write (compare (f(5), f(5)));
-- not stable: write (compare (f(5), f(6)));
-- not stable: write (compare (f(6), f(5)));
2019-12-20 00:23:35 +03:00
write (compare ({1, 2, 3}, {1, 2, 3}));
write (compare ({1, [2], [[3]]}, {1, [2], [[3]]}));
write (compare ({1, [2], [[3]]}, {1, [2], [3]}));
write (compare ({1, [2], [3]}, {1, [2], [[3]]}))