[RGT] RPCUtilsTest, replace un-executed EXPECT with unreachable

Unreachable code should be self-documented as unreachable.

Found by the Rotten Green Tests project.

Differential Revision: https://reviews.llvm.org/D98518
This commit is contained in:
Paul Robinson 2021-03-12 08:47:48 -08:00
parent 021de7cf80
commit 05eeb6077a
1 changed files with 2 additions and 4 deletions

View File

@ -871,8 +871,7 @@ TEST(DummyRPC, TestRemoveHandler) {
Server.addHandler<DummyRPCAPI::VoidBool>(
[](bool B) {
EXPECT_EQ(B, true)
<< "Server void(bool) received unexpected result";
llvm_unreachable("Server void(bool) received unexpected result");
});
Server.removeHandler<DummyRPCAPI::VoidBool>();
@ -884,8 +883,7 @@ TEST(DummyRPC, TestClearHandlers) {
Server.addHandler<DummyRPCAPI::VoidBool>(
[](bool B) {
EXPECT_EQ(B, true)
<< "Server void(bool) received unexpected result";
llvm_unreachable("Server void(bool) received unexpected result");
});
Server.clearHandlers();