About testlib.vase
This file contains the test library functions for Jarlang. It provides basic assertion helpers, pass/fail counters, and reporting for test suites.
Test Counters
| Name | Type | Description |
| TEST_PASSES | Variable | Counts the number of passing tests. |
| TEST_FAILS | Variable | Counts the number of failing tests. |
Assertions
| Function | Signature | Description |
| assert_eq | assert_eq(expected, actual, label) | Checks if expected == actual. Reports pass/fail with label. |
| assert_ne | assert_ne(expected, actual, label) | Checks if expected != actual. Reports pass/fail with label. |
| assert_true | assert_true(value, label) | Checks if value is true (1 or non-empty string). Reports pass/fail with label. |
| assert_false | assert_false(value, label) | Checks if value is false (0 or empty string). Reports pass/fail with label. |
Helpers
| Function | Signature | Description |
| report_pass | report_pass(label) | Increments TEST_PASSES and prints a pass message. |
| report_fail | report_fail(label, expected, actual) | Increments TEST_FAILS and prints a fail message. |
Summary & Reset
| Function | Signature | Description |
| test_summary | test_summary() | Prints a summary of passes and fails. |
| test_reset | test_reset() | Resets TEST_PASSES and TEST_FAILS to zero. |