MCPcopy Create free account
hub / github.com/boostorg/filesystem / cpp_main

Function cpp_main

test/fstream_test.cpp:141–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139} // unnamed namespace
140
141int cpp_main(int argc, char*[])
142{
143 if (argc > 1) cleanup = false;
144
145 std::cout << "BOOST_FILESYSTEM_C_STR defined as \""
146 << BOOST_STRINGIZE(BOOST_FILESYSTEM_C_STR) << "\"\n";
147
148 // test narrow characters
149 std::cout << "narrow character tests:\n";
150 test("narrow_fstream_test");
151
152
153 // So that tests are run with known encoding, use Boost UTF-8 codecvt
154 std::locale global_loc = std::locale();
155 std::locale loc(global_loc, new fs::detail::utf8_codecvt_facet);
156 fs::path::imbue(loc);
157
158 // test with some wide characters
159 // \u2780 is circled 1 against white background == e2 9e 80 in UTF-8
160 // \u2781 is circled 2 against white background == e2 9e 81 in UTF-8
161 // \u263A is a white smiling face
162 std::cout << "\nwide character tests:\n";
163 std::wstring ws(L"wide_fstream_test_");
164 ws += 0x2780;
165 ws += 0x263A;
166 test(ws);
167
168 return ::boost::report_errors();
169}

Callers

nothing calls this directly

Calls 1

testFunction · 0.85

Tested by

no test coverage detected