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 <boost/detail/lightweight_test.hpp> 10 #include "post_process.hpp" 11 12 #define EXPECT_EXCEPTION(test, msg) \ 13 try { \ 14 test; \ 15 BOOST_ERROR(msg); \ 16 } catch (quickbook::post_process_failure&) { \ 17 } 18 main()19int main() 20 { 21 EXPECT_EXCEPTION( 22 quickbook::post_process("</thing>"), "Succeeded with unbalanced tag"); 23 EXPECT_EXCEPTION( 24 quickbook::post_process("<"), "Succeeded with badly formed tag"); 25 26 return boost::report_errors(); 27 } 28