MCPcopy Create free account
hub / github.com/Kitware/CMake / nonExistentDirectoryTest

Function nonExistentDirectoryTest

Source/kwsys/testDirectory.cxx:80–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static int nonExistentDirectoryTest()
81{
82 using namespace kwsys;
83 int res = 0;
84 std::string testdirpath(TEST_SYSTEMTOOLS_BINARY_DIR
85 "/directory_testing/doesnt_exist/");
86 std::string errorMessage;
87 Directory testdir;
88
89 errorMessage = "foo";
90 // Increment res failure if directory lists
91 res += testdir.Load(testdirpath, &errorMessage) ? 1 : 0;
92#if !defined(_WIN32) || defined(__CYGWIN__)
93 // Increment res failure if errorMessage is unmodified
94 res += (errorMessage == "foo");
95#endif
96
97 errorMessage = "foo";
98 // Increment res failure if directory has files
99 res += (testdir.GetNumberOfFilesInDirectory(testdirpath, &errorMessage) > 0);
100#if !defined(_WIN32) || defined(__CYGWIN__)
101 // Increment res failure if errorMessage is unmodified
102 res += (errorMessage == "foo");
103#endif
104
105 return res;
106}
107
108static int copyDirectoryTest()
109{

Callers 1

testDirectoryFunction · 0.85

Calls 2

LoadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…