| 258 | } |
| 259 | |
| 260 | bool testObservers() |
| 261 | { |
| 262 | std::cout << "testObservers()"; |
| 263 | |
| 264 | bool result = true; |
| 265 | |
| 266 | { |
| 267 | std::string s("a/b/c"); |
| 268 | fs::path p(s); |
| 269 | fs::path::string_type st; |
| 270 | for (auto c : s) { |
| 271 | st += static_cast<fs::path::value_type>(c); |
| 272 | } |
| 273 | if (p.native() != st || static_cast<fs::path::string_type>(p) != st || |
| 274 | p.c_str() != st) { |
| 275 | result = false; |
| 276 | } |
| 277 | } |
| 278 | { |
| 279 | std::string s("a//b//c"); |
| 280 | std::wstring ws(L"a//b//c"); |
| 281 | fs::path p(s); |
| 282 | if (p.string() != s || p.wstring() != ws) { |
| 283 | result = false; |
| 284 | } |
| 285 | } |
| 286 | { |
| 287 | std::string s("a/b/c"); |
| 288 | std::wstring ws; |
| 289 | for (auto c : s) { |
| 290 | ws += static_cast<std::wstring::value_type>(c); |
| 291 | } |
| 292 | std::string ns(s); |
| 293 | std::replace( |
| 294 | ns.begin(), ns.end(), '/', |
| 295 | static_cast<std::string::value_type>(fs::path::preferred_separator)); |
| 296 | fs::path p(ns); |
| 297 | if (p.generic_string() != s || p.generic_wstring() != ws) { |
| 298 | result = false; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | checkResult(result); |
| 303 | |
| 304 | return result; |
| 305 | } |
| 306 | |
| 307 | bool testCompare() |
| 308 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…