[libcxx-commits] [PATCH] D89943: [libcxx] [test] Fix path.decompose for windows

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 25 04:14:36 PST 2021


curdeius added inline comments.


================
Comment at: libcxx/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp:184
+        std::replace(root_name.begin(), root_name.end(), '\\', '/');
+        if (root_name[0] == '/' && root_name[1] == '/')
+          assert(p.is_absolute() == true);
----------------
root_name here can possibly have less than 2 characters. You should probably assert that if it's non-empty, then it should have size() >= 2.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89943/new/

https://reviews.llvm.org/D89943



More information about the libcxx-commits mailing list