diff options
author | Jan Korous <jkorous@apple.com> | 2018-04-04 13:31:39 +0000 |
---|---|---|
committer | Jan Korous <jkorous@apple.com> | 2018-04-04 13:31:39 +0000 |
commit | b5fc2b14330de7b67036e77f752907a2965007ed (patch) | |
tree | c05bdaae69ac94924bb260a702255842f7c731cc /libcxx/test/std/experimental/filesystem/fs.op.funcs | |
parent | 13545a277eef2e397e5722ae8fd417dff3a22477 (diff) | |
download | bcm5719-llvm-b5fc2b14330de7b67036e77f752907a2965007ed.tar.gz bcm5719-llvm-b5fc2b14330de7b67036e77f752907a2965007ed.zip |
[libcxx][test] Improve assert message
llvm-svn: 329194
Diffstat (limited to 'libcxx/test/std/experimental/filesystem/fs.op.funcs')
-rw-r--r-- | libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp index 24beb69359c..d5d2043d7eb 100644 --- a/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp +++ b/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp @@ -102,9 +102,17 @@ TEST_CASE(basic_test) { std::error_code ec = GetTestEC(); fs::path p(TC.input); const fs::path output = fs::proximate(p, TC.base, ec); - TEST_CHECK(!ec); - TEST_CHECK(PathEq(output, TC.expect)); - if (!PathEq(output, TC.expect)) { + if (ec) { + TEST_CHECK(!ec); + std::cerr << "TEST CASE #" << ID << " FAILED: \n"; + std::cerr << " Input: '" << TC.input << "'\n"; + std::cerr << " Base: '" << TC.base << "'\n"; + std::cerr << " Expected: '" << TC.expect << "'\n"; + + std::cerr << std::endl; + } else if (!PathEq(output, TC.expect)) { + TEST_CHECK(PathEq(output, TC.expect)); + const path canon_input = fs::weakly_canonical(TC.input); const path canon_base = fs::weakly_canonical(TC.base); const path lexically_p = canon_input.lexically_proximate(canon_base); |