Skip to content

Single Hpp File

Compare
Choose a tag to compare
@claremacrae claremacrae released this 28 Aug 20:26
· 3394 commits to master since this release
  • Breaking changes
    • Virtually all code is now in a new ApprovalTests namespace, and user code will need to be updated (#5). There are two approaches to updating your code:
      • Option 1: Explicitly add ApprovalTests:: to your code, for example:

        -Approvals::verify("My objects!");
        +ApprovalTests::Approvals::verify("My objects!");
        -auto directory = Approvals::useApprovalsSubdirectory("approval_tests");
        +auto directory = ApprovalTests::Approvals::useApprovalsSubdirectory("approval_tests");
      • Option 2: Add a using directive near the top of your test files:

        +using namespace ApprovalTests;
    • ApprovalWriter and ApprovalNamer methods are now const. Any custom implementations of these interfaces will need to be updated. If this causes a problem for custom implementations, please make your data members mutable. (#22, #23)
    • The directory structure of ApprovalTests/ has been tidied up. This won't affect affect users of the single header download. If you use this project as a sub-module, or have cloned it directly, you will need to update the paths in some of your #includes. However, if you would like help updating your tests, please contact us via the details in the Contributing page. (#17)
    • We have removed using std::string; from all our code. If you happen to have code that worked accidentally because our usings brought in string, you might need to update your code.
    • We have removed support for the Okra test framework, as we believe nobody is using the integration, and it was a non-trivial amount of work to get it working again with changes we have made recently.
  • New features
  • Bug fixes
    • Check file streams are valid before using them.
  • Other changes