Add basic testsuite using ui_test

This commit is contained in:
nora 2023-08-01 11:57:44 +02:00
parent 1551847d8c
commit b68d775671
13 changed files with 1524 additions and 79 deletions

View file

@ -0,0 +1,19 @@
//@check-pass
function main() = (
noArgs();
singleArg("hi!");
manyArgs(1,2,3,4,5,6);
let a: () = returnNothing();
let b: () = returnExplicitUnit();
let c: String = returnString();
);
function noArgs() =;
function singleArg(a: String) =;
function manyArgs(a: Int, b: Int, c: Int, d: Int, e: Int, f: Int) =;
function returnNothing() =;
function returnExplicitUnit(): () =;
function returnString(): String = "uwu";

2
tests/ui/hello_world.nil Normal file
View file

@ -0,0 +1,2 @@
//@check-pass
function main() = print("Hello, world!\n");

View file

@ -0,0 +1,21 @@
//@check-pass
type CustomType = {};
function main() = ();
function assigns(
a: Int,
b: I32,
c: String,
d: Bool,
e: CustomType,
f: (Int, I32),
) = (
let a1: Int = a;
let b1: I32 = b;
let c1: String = c;
let d1: Bool = d;
let e1: CustomType = e;
let f1: (Int, I32) = f;
);