diff --git a/tests/sqf/boolean.sqf b/tests/sqf/boolean.sqf index 3ac9c5b4..19568fd0 100644 --- a/tests/sqf/boolean.sqf +++ b/tests/sqf/boolean.sqf @@ -1,15 +1,17 @@ -[ ["assertTrue", { true }], // BOOL - ["assertFalse", { false }], // BOOL - ["assertException", { true == true }], // BOOL op BOOL - ["assertTrue", { true isEqualTo true }], // BOOL isEqualTo BOOL - ["assertTrue", { false isEqualTo false }], // BOOL isEqualTo BOOL - ["assertFalse", { true isEqualTo false }], // BOOL isEqualTo BOOL - ["assertFalse", { false isEqualTo true }], // BOOL isEqualTo BOOL - ["assertTrue", { true && true }], // BOOL && BOOL - ["assertFalse", { true && false }], // BOOL && BOOL - ["assertFalse", { false && true }], // BOOL && BOOL - ["assertFalse", { false && { true } }], // BOOL && CODE - ["assertTrue", { false || true }], // BOOL || BOOL - ["assertTrue", { false || { true } }], // BOOL || CODE - ["assertFalse", { false isEqualTo true }] // BOOL isEqualTo BOOL +[ ["assertTrue", { true }], // BOOL + ["assertFalse", { false }], // BOOL + ["assertException", { true == true }], // BOOL op BOOL + ["assertTrue", { true isEqualTo true }], // BOOL isEqualTo BOOL + ["assertTrue", { false isEqualTo false }], // BOOL isEqualTo BOOL + ["assertFalse", { true isEqualTo false }], // BOOL isEqualTo BOOL + ["assertFalse", { false isEqualTo true }], // BOOL isEqualTo BOOL + ["assertTrue", { true && true }], // BOOL && BOOL + ["assertFalse", { true && false }], // BOOL && BOOL + ["assertFalse", { false && true }], // BOOL && BOOL + ["assertFalse", { false && { true } }], // BOOL && CODE + ["assertTrue", { false || true }], // BOOL || BOOL + ["assertTrue", { false || { true } }], // BOOL || CODE + ["assertTrue", { !false }], // BOOL || CODE + ["assertFalse", { !true }], // BOOL || CODE + ["assertFalse", { false isEqualTo true }] // BOOL isEqualTo BOOL ] diff --git a/tests/sqf/while.sqf b/tests/sqf/while.sqf index ffd5bdec..524bd28f 100644 --- a/tests/sqf/while.sqf +++ b/tests/sqf/while.sqf @@ -1,10 +1,10 @@ -[ ["assertEqual", { private _i = 0; while{ false } do { _i = 1 }; _i }, 0], // while CODE do CODE: condition false - ["assertIsNil", { while{ false } do {} } ], // while CODE do CODE: condition false - ["assertException", { while{ } do {} } ], // while CODE do CODE: condition empty - ["assertException", { while{ "" } do {} } ], // while CODE do CODE: condition not BOOL - ["assertIsNil", { while{ nil } do {} } ], // while CODE do CODE: condition nil - ["assertEqual", { private _i = 0; while{ _i == 0 } do { _i = 1 }; _i }, 1], // while CODE do CODE: condition true before body executed - ["assertEqual", { private _i = 0; while{ _i = _i + 1; _i < 5 } do {}; _i }, 5], // while CODE do CODE: empty body - ["assertEqual", { private _i = 0; while{ _i = _i + 1; _i < 5 } do { nil }; _i }, 5], // while CODE do CODE: nil body - ["assertEqual", { private _i = 0; while{ _i < 5 } do { _i = _i + 1; }; _i }, 5] // while CODE do CODE: normal body +[ ["assertEqual", { private _i = 0; while { false } do { _i = 1 }; _i }, 0], // while CODE do CODE: condition false + ["assertIsNil", { while { false } do {} } ], // while CODE do CODE: condition false + ["assertException", { while { } do {} } ], // while CODE do CODE: condition empty + ["assertException", { while { "" } do {} } ], // while CODE do CODE: condition not BOOL + ["assertIsNil", { while { nil } do {} } ], // while CODE do CODE: condition nil + ["assertEqual", { private _i = 0; while { _i == 0 } do { _i = 1 }; _i }, 1], // while CODE do CODE: condition true before body executed + ["assertEqual", { private _i = 0; while { _i = _i + 1; _i < 5 } do {}; _i }, 5], // while CODE do CODE: empty body + ["assertEqual", { private _i = 0; while { _i = _i + 1; _i < 5 } do { nil }; _i }, 5], // while CODE do CODE: nil body + ["assertEqual", { private _i = 0; while { _i < 5 } do { _i = _i + 1; }; _i }, 5] // while CODE do CODE: normal body ] \ No newline at end of file