Skip to content

v0.2.2

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