]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/filesystem/test/sample_test.cpp
1 // filesystem sample_test.cpp ----------------------------------------------//
3 // Copyright Beman Dawes 2012
5 // Distributed under the Boost Software License, Version 1.0.
6 // See http://www.boost.org/LICENSE_1_0.txt
8 // --------------------------------------------------------------------------//
10 // This program provides a template for bug reporting test cases.
12 // --------------------------------------------------------------------------//
14 #include <boost/config/warning_disable.hpp>
15 #include <boost/filesystem.hpp>
16 #include <boost/core/lightweight_test.hpp>
20 #ifndef BOOST_LIGHTWEIGHT_MAIN
21 # include <boost/test/prg_exec_monitor.hpp>
23 # include <boost/detail/lightweight_main.hpp>
26 namespace fs
= boost::filesystem
;
38 // cpp_main ----------------------------------------------------------------//
40 int cpp_main(int argc
, char* argv
[])
42 if (argc
> 1 && std::strcmp(argv
[1], "--no-cleanup") == 0)
45 // Test cases go after this block of comments
46 // Use test case macros from boost/core/lightweight_test.hpp:
48 // BOOST_TEST(predicate); // test passes if predicate evaluates to true
49 // BOOST_TEST_EQ(x, y); // test passes if x == y
50 // BOOST_TEST_NE(x, y); // test passes if x != y
51 // BOOST_ERROR(msg); // test fails, outputs msg
53 // BOOST_TEST(path("f00").size() == 3); // test passes
54 // BOOST_TEST_EQ(path("f00").size(), 3); // test passes
55 // BOOST_MSG("Oops!"); // test fails, outputs "Oops!"
59 // Remove any test files or directories here
62 return ::boost::report_errors();