| 164 | } // namespace |
| 165 | |
| 166 | int cpp_main(int argc, char*[]) |
| 167 | { |
| 168 | if (argc > 1) |
| 169 | cleanup = false; |
| 170 | |
| 171 | std::cout << "BOOST_FILESYSTEM_C_STR(p) defined as \"" |
| 172 | << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR(p)) << "\"\n"; |
| 173 | |
| 174 | // test narrow characters |
| 175 | std::cout << "narrow character tests:\n"; |
| 176 | test(fs::unique_path("narrow_fstream_test-%%%%-%%%%.txt")); |
| 177 | |
| 178 | // So that tests are run with known encoding, use Boost UTF-8 codecvt |
| 179 | std::locale global_loc = std::locale(); |
| 180 | std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet()); |
| 181 | fs::path::imbue(loc); |
| 182 | |
| 183 | // test with some wide characters |
| 184 | // \u2780 is circled 1 against white background == e2 9e 80 in UTF-8 |
| 185 | // \u2781 is circled 2 against white background == e2 9e 81 in UTF-8 |
| 186 | // \u263A is a white smiling face |
| 187 | std::cout << "\nwide character tests:\n"; |
| 188 | std::wstring ws(L"wide_fstream_test_"); |
| 189 | ws.push_back(static_cast< wchar_t >(0x2780)); |
| 190 | ws.push_back(static_cast< wchar_t >(0x263A)); |
| 191 | ws.append(L"-%%%%-%%%%.txt"); |
| 192 | test(fs::unique_path(ws)); |
| 193 | |
| 194 | #if !defined(BOOST_FILESYSTEM_DETAIL_NO_CXX11_MOVABLE_FSTREAMS) && !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) |
| 195 | test_movable(); |
| 196 | #endif |
| 197 | |
| 198 | return ::boost::report_errors(); |
| 199 | } |
nothing calls this directly
no test coverage detected