As discussed offline, something different from EXPECT_EQ should be used to check if the container contains enough items before accessing them so that other tests can still be run even if the assertion fails as opposed to having EXPECT_EQ failing and then aborting the run due to the errors caused by out-of-bounds memory access.
Details
Details
Diff Detail
Diff Detail
Event Timeline
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp | ||
---|---|---|
1877–1880 | We should not break out of the loop here. if (size() != 1) { ADD_FAILURE() << ""; continue; } |
Comment Actions
LGTM, but please update the other diff as well!
clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp | ||
---|---|---|
712 | Same here, actually. We should not break out of the loop. |
clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp | ||
---|---|---|
713 | add continue! |
We should not break out of the loop here.
Maybe do