AguaClara / aide_featurescript

0 stars 0 forks source link

TEST: Add tests for failing the range checks of Core FS functions #33

Open fletchapin opened 3 years ago

fletchapin commented 3 years ago

Describe the Missing Coverage

Many functions check the range of acceptable values before calculating anything, and throw errors as a result. For example, widthWeirRect(0.0025 * meter^3 / second, 0.0 * meter) should return throw Value of Height is 0 which is not within range of GZ. Currently there is no way to test that the correct error occurs.

Expected Behavior

When an error such as throw Value of Height is 0 which is not within range of GZ occurs the Tester feature should be able to parse the error message and check that it matches the expected error.

Recommended Fix

I believe this could be accomplished by catching all errors thrown during testing and converting the error message to a string. Then that string would be compared to an expected error string.