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

Function test

test/cstdio_test.cpp:50–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48};
49
50void test(fs::path const& p)
51{
52 fs::remove(p);
53 {
54 std::cout << " in test 1\n";
55 auto_fclose file(fs::fopen(p, "w"));
56 BOOST_TEST(file.get() != nullptr);
57 }
58 {
59 std::cout << " in test 2\n";
60 auto_fclose file(fs::fopen(p, "r"));
61 BOOST_TEST(file.get() != nullptr);
62 }
63 {
64 std::cout << " in test 3\n";
65 auto_fclose file(fs::fopen(p / p.filename(), "w")); // should fail
66 BOOST_TEST(file.get() == nullptr);
67 }
68
69 if (cleanup)
70 fs::remove(p);
71}
72
73} // namespace
74

Callers 1

cpp_mainFunction · 0.70

Calls 4

fopenFunction · 0.85
getMethod · 0.80
filenameMethod · 0.80
removeFunction · 0.50

Tested by

no test coverage detected