@@ -8,16 +8,26 @@ snowhouse
88An assertion library for C++
99
1010Snowhouse is a stand-alone assertion framework for C++.
11-
1211It is a header-only library.
13- You can simply use the ` headers-only ` branch as a submodule:
12+
13+ Snowhouse requires a C++11-compatible compiler since version 5.0.0.
14+ Feel free to use Snowhouse with major version 4 if you want to use it
15+ in a pre-C++11 setting.
16+ Major version 4 is still maintained in the ` maint-v4 ` branch (bug fixes, etc.).
17+
18+ For inclusion in your projects, you have several options:
19+
20+ a) You can copy the code and just use it as the license allows.
21+
22+ b) You can use the ` headers-only ` branch as a submodule:
1423
1524``` sh
1625git submodule add -b headers-only https://github.com/banditcpp/snowhouse snowhouse
1726git submodule update --init --recursive
1827```
1928
20- As an alternative, CMake >= 3.0 users can use Snowhouse with the provided library target.
29+ c) If you use CMake >= 3.1 in your project,
30+ you can use Snowhouse with the provided library target.
2131Assuming you have cloned the ` master ` branch into a ` snowhouse ` subdirectory,
2232your ` CMakeLists.txt ` might contain lines like the following:
2333
@@ -43,10 +53,10 @@ int main()
4353 {
4454 AssertThat(12, Is().LessThan(11).And().GreaterThan(99));
4555 }
46- catch(const AssertionException& ex)
56+ catch (const AssertionException& ex)
4757 {
4858 std::cout << "Apparently this failed:" << std::endl;
49- std::cout << ex.GetMessage () << std::endl;
59+ std::cout << ex.what () << std::endl;
5060 }
5161
5262 return 0;
@@ -166,9 +176,6 @@ AssertThat(x, IsNull());
166176AssertThat(x, Is().Null());
167177```
168178
169- Note that this feature is only available for C++11-compliant compilers.
170- In this case, the ` SNOWHOUSE_HAS_NULLPTR ` macro is defined.
171-
172179### String Constraints
173180
174181String assertions in Snowhouse are used to verify the values of
@@ -518,6 +525,11 @@ Compatibility-breaking changes since version 3.0.0:
518525 Booleans are now displayed as ` true ` or ` false ` .
519526 Strings are put into quotation marks for improved readability.
520527
528+ * Since version 5.0.0, the support for C++ versions prior to C++11 are dropped.
529+ The definition of the macro ` SNOWHOUSE_HAS_NULLPTR ` is removed.
530+ Our exceptions are now derived from the ` std::exception ` hierarchy,
531+ thus their method names changed.
532+
521533## Contributing
522534
523535The development of Snowhouse takes place on [ GitHub] ( //github.com/banditcpp/snowhouse ) .
@@ -533,7 +545,7 @@ Please make sure to be consistent with the project's coding style.
533545The ` .clang-format ` file allows easy checking and implementation of the
534546coding style.
535547
536- C++ code should comply to C++98, C++03- and C++ 11.
548+ C++ code should comply to C++11.
537549Please use ` __cplusplus ` guards if you want to use language features of
538550a certain C++ version.
539551
0 commit comments