Commit Graph

11 Commits

Author SHA1 Message Date
Michael Tautschnig 46f7987359 Fix perl regular expressioons in regression test descriptions
Parentheses need to be escaped, and || as well as && are interpreted by perl as
or/and (and thus need escaping as well).
2018-05-17 17:35:21 +01:00
Chris Smowton 3b00bdc085 Fix tests with missing EXIT or SIGNAL tests
Some tests had previously been passing despite actually causing a crash, due
to the required output being too loosely specified. This ensures the bare minimum:
that every test has an expected EXIT code and SIGNAL result.

The codes suggested were taken from the test's current output, and only applied for
CORE tests, but hand inspection suggests these choices are reasonable.
2018-03-23 11:37:53 +00:00
Daniel Kroening 32dcad8026 test approx-const-fp-array-variable-invalid-cast-const-fp now more generous 2017-10-13 17:23:20 +01:00
thk123 e2049b0ab3 Making the approx and precise FP removal tests more precise
We now exclude the line that would catch if the function is replaced by
all 9 possibilities.
2017-06-13 18:23:02 +01:00
Michael Tautschnig 05192db2b8 Remove blank lines from regression test specs
Matching blank lines fails on Windows/AppVeyor. Also, there should not be any
requirement for our output to contain blank lines.
2017-04-06 14:08:21 +01:00
Vojtech Forejt 65cad8fe7e Fix failing test's regexp.
This was caused by two PRs being merged concurrently, #519 which introduced
the test and #358 which changed the output when running the test.
2017-04-04 15:20:26 +01:00
thk123 18b5907787 Fixing tests to work with new test.pl
The new test.pl script requrires breaks to be escaped.
2017-03-24 10:33:38 +00:00
thk123 cf6a49a6b5 Swap to using an unorded set
Modified the tests to not assume the order of the functions.

For precise tests no further changes are required since if
the removal failed, there will be a label before the call to be jumped to.

For the no-match tests, no further changes are required since the
goto statements are being verified to be all the there.

For the approx tests, we need to verify that
the other case statements aren't present in the GOTO program to be sure
that the FP removal has been successful. As such, the other case
statements are added to the exclude section.
2017-03-24 10:33:38 +00:00
thk123 e57677ee60 Adding the pointer check flag
To handle the cases where the function pointer is null, we enable the
pointer--check flag. This asserts that one of the branches is taken
(e.g. a valid function pointer). This wasn't supported by goto-analyze
so added the option to it.
2017-03-24 10:33:38 +00:00
thk123 a6e71e0459 Tidied up tests
Consistent indentation
Consistent functions for the function pointers.
Made braces appear on the next line.
Made all structs include at least two components.
Corrected the name of two of the tests.
Remove unused imports.
Made all the mains return int so they compile with clang with no
warnings.
Enabling debug output for all tests so can see the output
Removing out of date comments from the tests
Missing empty lines
2017-03-24 10:33:37 +00:00
thk123 3e669c0231 Renamed all the tests
Gave all the regression tests sensible names so relevant cases can be
found and missing cases identified.
2017-03-24 10:33:37 +00:00