mirror of
https://github.com/boostorg/contract.git
synced 2026-02-27 04:52:22 +00:00
compiling all tests after some reorganization
This commit is contained in:
15
test/set/function_set_post_pre_post_error.cpp
Normal file
15
test/set/function_set_post_pre_post_error.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
#include <boost/contract/free_function.hpp>
|
||||
|
||||
// Test post cannot be set twice (not even after pre) for free functions
|
||||
// (member functions use same setter objects, so no need to test those too).
|
||||
|
||||
int main() {
|
||||
auto c = boost::contract::free_function()
|
||||
.postcondition([&] {})
|
||||
.precondition([&] {})
|
||||
.postcondition([&] {}) // Error.
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user