summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/contract/test/check/axiom.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/contract/test/check/axiom.hpp')
-rw-r--r--src/boost/libs/contract/test/check/axiom.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/boost/libs/contract/test/check/axiom.hpp b/src/boost/libs/contract/test/check/axiom.hpp
new file mode 100644
index 00000000..ddf87f8c
--- /dev/null
+++ b/src/boost/libs/contract/test/check/axiom.hpp
@@ -0,0 +1,23 @@
+
+// no #include guard
+
+// Copyright (C) 2008-2018 Lorenzo Caminiti
+// Distributed under the Boost Software License, Version 1.0 (see accompanying
+// file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
+// See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
+
+#include <boost/contract/check.hpp>
+
+bool no_impl(); // Test func that cannot be impl in C++ sill OK in axioms.
+
+int main() {
+ #ifdef BOOST_CONTRACT_TEST_ERROR
+ BOOST_CONTRACT_CHECK_AXIOM(
+ BOOST_CONTRACT_TEST_ERROR_expected_undeclared_identifier);
+ #else
+ BOOST_CONTRACT_CHECK_AXIOM(false); // Test always false, OK.
+ BOOST_CONTRACT_CHECK_AXIOM(no_impl()); // Test no implementation, OK.
+ #endif
+ return 0;
+}
+