Skip to content

Releases: Timothy-Gonzalez/caught

v0.3.6

12 Feb 20:30
v0.3.6
40b417a
Compare
Choose a tag to compare

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

12 Feb 07:16
v0.3.5
32d151c
Compare
Choose a tag to compare

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

12 Feb 05:44
v0.3.4
2bc95d5
Compare
Choose a tag to compare

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

12 Feb 00:33
v0.3.3
e592d34
Compare
Choose a tag to compare

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

10 Feb 20:45
v0.3.2
e26179b
Compare
Choose a tag to compare

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

10 Feb 20:35
v0.3.1
cb98c09
Compare
Choose a tag to compare

Fixed an edge case with MOCK_STDOUT when nothing is output - it will block forever.

Bug Fixes

  • Fix caught output going to mock in #31
  • Fix MOCK_STDOUT blocking forever with empty output in #32

Full Changelog: v0.3.0...v0.3.1

v0.3.0

10 Feb 18:20
v0.3.0
ed17c87
Compare
Choose a tag to compare

The first official release! Caught is now stable enough to be used! See the docs to get started!

New Features

  • Add array assertions in #20
  • Add in assertions in #24
  • Add generic expect in #29
  • Add docs in #30

Bug fixes

  • Fix internal outputs in #28

Full Changelog: v0.2.3...v0.3.0

v0.2.3

08 Feb 07:32
v0.2.3
434fb1d
Compare
Choose a tag to compare
v0.2.3 Pre-release
Pre-release

Features

  • Add stdout mocking in #11
  • Improve string and char formatting in #17
  • Better error handling in #18
  • Add version header in #19

Bug Fixes

  • Cleanup mem loss when forking in #16

Misc

  • Rename caught_internal -> caught_internal_state in #10

Full Changelog: v0.2.2...v0.2.3

v0.2.2

06 Feb 08:52
v0.2.2
5593bd8
Compare
Choose a tag to compare
v0.2.2 Pre-release
Pre-release
  • 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
      }

Full Changelog: v0.2.1...v0.2.2

v0.2.1

05 Feb 00:34
v0.2.1
859b8f8
Compare
Choose a tag to compare
v0.2.1 Pre-release
Pre-release
  • 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);

Full Changelog: v0.2.0...v0.2.1