]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/quickbook/test/unit/post_process_test.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / quickbook / test / unit / post_process_test.cpp
1 /*=============================================================================
2 Copyright (c) 2011 Daniel James
3
4 Use, modification and distribution is subject to the Boost Software
5 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8
9 #include "post_process.hpp"
10 #include <boost/detail/lightweight_test.hpp>
11
12 #define EXPECT_EXCEPTION(test, msg) \
13 try { \
14 test; \
15 BOOST_ERROR(msg); \
16 } \
17 catch(quickbook::post_process_failure&) { \
18 }
19
20 int main()
21 {
22 EXPECT_EXCEPTION(
23 quickbook::post_process("</thing>"),
24 "Succeeded with unbalanced tag");
25 EXPECT_EXCEPTION(
26 quickbook::post_process("<"),
27 "Succeeded with badly formed tag");
28
29 return boost::report_errors();
30 }