Ticket #4716: comn_pathlexicalcast_test.cpp
| File comn_pathlexicalcast_test.cpp, 477 bytes (added by , 12 years ago) |
|---|
| Line | |
|---|---|
| 1 | #include <boost/test/unit_test.hpp> |
| 2 | |
| 3 | #include <string> |
| 4 | |
| 5 | #include <boost/lexical_cast.hpp> |
| 6 | #include <boost/filesystem/path.hpp> |
| 7 | |
| 8 | BOOST_AUTO_TEST_SUITE(TestPathLexicalCast) |
| 9 | |
| 10 | BOOST_AUTO_TEST_CASE(TestPathLexicalCastWorks) |
| 11 | { |
| 12 | using namespace std; |
| 13 | using namespace boost; |
| 14 | using namespace filesystem; |
| 15 | |
| 16 | const string str("/export/home"); |
| 17 | path p = lexical_cast<path>(str); |
| 18 | |
| 19 | BOOST_CHECK_EQUAL(p.string(), str); |
| 20 | } |
| 21 | |
| 22 | BOOST_AUTO_TEST_SUITE_END(); |
