mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 04:52:22 +00:00
added tests for throwing from .old()
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
|
||||
// TODO: Document that there is a MSVC 2010 bug for which lambdas cannot be used in template constructor intialization list (this was fixed in MSVC 2013). Therefore, an external (static member) function must be used (possibly with bind and cref) to program constructor preconditions on MSVC 2010 instead of using lambdas.
|
||||
|
||||
// TODO: Test failure handlers, throw on contract failure, and throw user-defined exceptions: (1) Add a test for throwing exception handlers (somewhat similar to stroustrup97/string.cpp but more comprehensive); (2) Test what happens if bodies throw (e.g., public function should still check inv, dtor too, but ctor should not, etc.)... test all contract types when bodies throw; (3) Test what happens if old expression copies throw (with OLDOF and with .old()).
|
||||
|
||||
// TODO: Test contract assertion disabled while checking assertions adding a test to disable/ similar to n1962/factorial.cpp, where contract recursively calls the function itself in the assertions.
|
||||
|
||||
// TODO: Test overloading for all contract types. Also test subcontracting of overloaded virtual functions (overload both overridden and overriding functions).
|
||||
|
||||
@@ -238,8 +238,6 @@ private:
|
||||
check_post_r<R>(r);
|
||||
}
|
||||
|
||||
// TODO: See if these and other enable_if can be replaced using template specializations and a base class for template where to put common code (that might be faster to compile... not sure...).
|
||||
|
||||
template<typename R_, typename Result>
|
||||
typename boost::enable_if<is_optional<R_> >::type
|
||||
check_post_r(Result const& r) { this->check_post(r); }
|
||||
|
||||
Reference in New Issue
Block a user