10 // Function to compare and log values
11 function expect(comment, v_real, v_expected) {
12 tests_total = tests_total +1;
13 if (v_real == v_expected) {
14 print ("PASS: " + comment);
15 tests_passed = tests_passed +1;
17 print ("FAIL: '" + comment + "' - Expected " + v_expected + ", but got " + v_real);
18 tests_failed = tests_failed +1;
25 print ("Tests total: " + tests_total);
26 print ("Tests passed: " + tests_passed);
27 print ("Tests failed: " + tests_failed);
32 branch_a = main_a + ",bo:0";
33 branch_b = main_a + ",bo:1";
34 branch_c = main_a + ",bo:2";
40 // Testing the test function
41 expect ("1 should equal 3", 1, 3);
42 expect ("2 should equal 2", 2, 2);