Releases: Timothy-Gonzalez/caught
v0.3.6
Fixes match matching extra for the last segment
Bug Fixes
- Fix match matching extra in #39
Full Changelog: v0.3.5...v0.3.6
v0.3.5
Fixed a issue where EXPECT_STR("abc_abc_abc", match, "%s_%s_%s")
would fail because backtracing was not implemented, and the first specifier would greedily consume everything.
Bug Fixes
- Fix match backtracing in #38
Full Changelog: v0.3.4...v0.3.5
v0.3.4
This release adds MOCK_STDIN(char* input)
and RESTORE_STDIN()
, which provide the ability to mock what is read from stdin in tests.
Features
- Add mock stdin in #37
Full Changelog: v0.3.3...v0.3.4
v0.3.3
This release adds the match operator, which makes testing strings with variable values (such as pid) much easier. See the docs here.
Features
- Add match operator in #35
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Fixed a misc bug where having a #define _GNU_SOURCE
outside of Caught would cause a conflict
Bug Fixes
- Fix defines in #33
Full Changelog: v0.3.1...v0.3.2
v0.3.1
Fixed an edge case with MOCK_STDOUT
when nothing is output - it will block forever.
Bug Fixes
Full Changelog: v0.3.0...v0.3.1
v0.3.0
v0.2.3
v0.2.2
- Add signal and exit code support #9
- Adds assertions to expect the code inside to signal/exit (NOTE: This internally requires forking, so make sure your system will need to support forks for this to work.)
TEST("exit - success") { EXPECT_EXIT(EXIT_SUCCESS, { exit(EXIT_SUCCESS); }); EXPECT_INT(1 + 1, ==, 2); // This still runs } TEST("signal - SIGSEGV") { EXPECT_SIGNAL(SIGSEGV, { int *ptr = NULL; ptr[1] = 123; // BAD! }); EXPECT_INT(1 + 1, ==, 2); // This still runs }
- Adds assertions to expect the code inside to signal/exit (NOTE: This internally requires forking, so make sure your system will need to support forks for this to work.)
Full Changelog: v0.2.1...v0.2.2
v0.2.1
- Add ptr support in #3
- Now, you don't have to assert a pointer not being null before de-refing it, you can just pass it directly
// For example: assume a and b are int*s EXPECT_PTR(a, !=, NULL); EXPECT_PTR(b, !=, NULL); EXPECT_INT(*a, >, *b); // becomes: EXPECT_INT_PTR(a, >, b);
- Now, you don't have to assert a pointer not being null before de-refing it, you can just pass it directly
Full Changelog: v0.2.0...v0.2.1