JustUI/juic/examples/unit_tests.jui

42 lines
484 B
Text

null;
//^ null;
1+2;
//^ 3;
let zero = 0;
zero + 2 * 20 - 8 / 4;
//^ 38;
"hello" + "," + "world";
//^ "hello,world";
if(2 < 4) 8;
//^ 8;
if(2 > 4) 8;
//^ null;
if(2 > 4) 8 else 14;
//^ 14;
let z = 4;
(z + 10) * 3;
//^ 42;
let helloworld = "Hello, World!";
len("xyz" + helloworld) + 1;
//^ 17;
record {};
//^ record {};
let r = record {x: 2; y: 3+5};
r;
//^ record {y:8; x:2};
r.x;
//^ 2;
record {x: r.x; y: this.x + 2; x: 4; z: this.x + 5};
//^ record {x: 4; y: 4; z: 9};