about summary refs log tree commit diff stats
path: root/js/scripting-lang/c/test_complex_unary.txt
blob: 95ce299340472aad30c09e4ad83d2f6c49de2ba5 (plain) (blame)
1
2
3
4
5
6
7
8
/* Test complex unary minus expressions */

/* Test complex unary minus expressions */
complex_negative1 : -(-5);
complex_negative2 : -(-(-3));
complex_negative3 : (-5) + 3;

..out "Complex unary test completed"; 
Integer.Long */
/* Simple each test */

numbers : {1, 2, 3, 4, 5};

/* each with table and scalar */
each_add : each @add numbers 10;
each_1 : each_add[1];
each_2 : each_add[2];
each_3 : each_add[3];
..assert each_1 = 11;
..assert each_2 = 12;
..assert each_3 = 13;

/* each with two tables */
table1 : {a: 1, b: 2, c: 3};
table2 : {a: 10, b: 20, c: 30};
each_sum : each @add table1 table2;
..assert each_sum.a = 11;
..assert each_sum.b = 22;
..assert each_sum.c = 33;

..out "Simple each test completed";