Revert "Removed theory parameter printing from sample & regression test"

& "Added regression tests on theories"

This reverts commits 4cc826eae3 and 6110f43d87.

Regression tests cannot be done on the two theory samples, as they both
illustrate the consequences of testing against undefined behaviour.

A full-fledged internal test should be set up in ./samples/tests for
this purpose.
This commit is contained in:
Snaipe 2015-09-26 01:37:36 +02:00
parent 5ffd883015
commit 974b7d0393
6 changed files with 6 additions and 36 deletions

View file

@ -1,18 +0,0 @@
[----] theories.c:27: Assertion failed: The expression (a) == (bad_div(bad_mul(a, b), b)) is false.
[----] Theory algebra::bad_divide_is_inverse_of_multiply failed with the following parameters: (2147483647, 2)
[----] theories.c:27: Assertion failed: The expression (a) == (bad_div(bad_mul(a, b), b)) is false.
[----] Theory algebra::bad_divide_is_inverse_of_multiply failed with the following parameters: (-2147483648, 2)
[----] theories.c:27: Unexpected signal caught below this line!
[FAIL] algebra::bad_divide_is_inverse_of_multiply: CRASH!
[----] theories.c:117: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (1)
[----] theories.c:117: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (2)
[----] theories.c:117: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (3)
[----] theories.c:117: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (4)
[----] theories.c:117: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (5)
[FAIL] theory::gen: (0.00s)
[====] Synthesis: Tested: 6 | Passing: 4 | Failing: 2 | Crashing: 1 

View file

@ -1,18 +0,0 @@
[----] theories.cc:31: Assertion failed: The expression (a) == (bad_div(bad_mul(a, b), b)) is false.
[----] Theory algebra::bad_divide_is_inverse_of_multiply failed with the following parameters: (2147483647, 2)
[----] theories.cc:31: Assertion failed: The expression (a) == (bad_div(bad_mul(a, b), b)) is false.
[----] Theory algebra::bad_divide_is_inverse_of_multiply failed with the following parameters: (-2147483648, 2)
[----] theories.cc:31: Unexpected signal caught below this line!
[FAIL] algebra::bad_divide_is_inverse_of_multiply: CRASH!
[----] theories.cc:125: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (1)
[----] theories.cc:125: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (2)
[----] theories.cc:125: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (3)
[----] theories.cc:125: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (4)
[----] theories.cc:125: Assertion failed: The conditions for this assertion were not met.
[----] Theory theory::gen failed with the following parameters: (5)
[FAIL] theory::gen: (0.00s)
[====] Synthesis: Tested: 6 | Passing: 4 | Failing: 2 | Crashing: 1 

View file

@ -98,6 +98,9 @@ Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d,
cr_assert_str_eq(str, "test");
cr_assert_str_eq(cstr, "other test");
cr_assert_eq(obj->foo, 42);
// abort to see the formatted string of all parameters
cr_assert_fail();
}
// Manually generate datapoints

View file

@ -106,6 +106,9 @@ Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d,
cr_assert_str_eq(str, "test");
cr_assert_str_eq(cstr, "other test");
cr_assert_eq(obj->foo, 42);
// abort to see the formatted string of all parameters
cr_assert_fail();
}
// Manually generate datapoints