Unit testing ensure that individual functions work properly. This also allows changes in the function implementation without needing to worry about the function breaking.
Since all unit tests can be run in an automated framework, there is minimal effort involved in reapplying the tests.
1
call CBA_fnc_test;
1
["cba", "arrays"] call CBA_fnc_test;
1
call compile preprocessFileLineNumbers "\x\cba\addons\arrays\test_filter.sqf";
For a function, CBA_fnc_eatFrogs which is a function in the category Eating, (defined in file addons\eating\fnc_eatFrogs.sqf), create a test file as addons\eating\test_eatFrogs.sqf. Use the ASSERT_* macros to test the function in this test file.