This revision was automatically updated to reflect the committed changes.
Closed by commit rL286812: Update tests for strings conversions under
libcpp-no-exceptions (authored by rogfer01).
Changed prior to commit:
https://reviews.llvm.org/D26139?vs=76373&id=9#toc
Repository:
rL LLVM
htt
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.
LGTM. The consensus is against adding `TEST_TRY` and `TEST_CATCH`.
https://reviews.llvm.org/D26139
___
cfe-commits mailing list
cfe-commits@lists
rogfer01 added a comment.
I'd rather not to go the way of `TEST_TRY` and `TEST_CASE` macros.
As suggested by @rmaprath, I've been playing with grouping the tests in three
categories: no exceptions (at all), should not throw, must throw. No changes
are required for the first group. The third gro
rmaprath added a comment.
In https://reviews.llvm.org/D26139#587587, @mclow.lists wrote:
> > I think it might be better to add TEST_TRY and TEST_CATCH(...) macros
> > defined like
>
> @rogfer01 said at the top that he didn't want to add "a magical TEST_TRY
> macro" - and I agree. Someone tri
mclow.lists added a comment.
> I think it might be better to add TEST_TRY and TEST_CATCH(...) macros
> defined like
@rogfer01 said at the top that he didn't want to add "a magical TEST_TRY macro"
- and I agree. Someone tried that in another review, and I nixed it there.
https://reviews.llv
EricWF added inline comments.
Comment at: test/std/strings/string.conversions/stold.pass.cpp:39
assert(idx == 2);
+#ifndef TEST_HAS_NO_EXCEPTIONS
try
Hmm. All of these `#ifdef`s get ugly fast. I think it might be better to add
`TEST_TRY` and `TEST_CATC
rmaprath added a comment.
Would it be more cleaner to separate out the exceptions-related tests into
their own functions? So, we'd have the two functions `test_withexceptions()`
and `test_noexceptions()`; the former will only be invoked when testing the
normal library variant, the latter will b
rogfer01 created this revision.
rogfer01 added reviewers: mclow.lists, EricWF, rmaprath.
rogfer01 added a subscriber: cfe-commits.
These files have two styles of tests
// First style
try {
action
assert(something-expected);
} catch ( exception ) {
assert(false);
}
// Seco