summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/metaparse/test/define_error.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/metaparse/test/define_error.cpp')
-rw-r--r--src/boost/libs/metaparse/test/define_error.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/boost/libs/metaparse/test/define_error.cpp b/src/boost/libs/metaparse/test/define_error.cpp
new file mode 100644
index 00000000..c61ec5d0
--- /dev/null
+++ b/src/boost/libs/metaparse/test/define_error.cpp
@@ -0,0 +1,28 @@
+// Copyright Abel Sinkovics (abel@sinkovics.hu) 2014.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_TEST_MODULE define_error
+
+#include <boost/metaparse/define_error.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+
+#include <boost/test/unit_test.hpp>
+
+namespace
+{
+ BOOST_METAPARSE_DEFINE_ERROR(test_error, "test error");
+}
+
+BOOST_AUTO_TEST_CASE(test_define_error)
+{
+ using boost::is_same;
+
+ BOOST_MPL_ASSERT((is_same<test_error, test_error::type>));
+
+ BOOST_CHECK_EQUAL("test error", test_error::get_value());
+}
+