GLabs validates every single line of code written, against some test cases. Test case error arises when the output of the program does not match the expected output (as given by the instructions).
Following are some of the checks that a typical test case would perform on the code:
Checks for the variable name
Checks for the functions output
Checks for the variable values
Checks for the various operations mentioned in the instructions