Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions runtime/executor/test/method_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ TEST_F(MethodTest, GetInputTests) {
method->get_input(num_inputs - 1);

// Out-of-range inputs should abort.
ET_EXPECT_DEATH(method->get_input(num_inputs), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->get_input(num_inputs + 1), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->get_input(num_inputs), ".+ >= .+");
ET_EXPECT_DEATH(method->get_input(num_inputs + 1), ".+ >= .+");
}

TEST_F(MethodTest, MutableInputTests) {
Expand All @@ -157,8 +157,8 @@ TEST_F(MethodTest, MutableInputTests) {
method->mutable_input(num_inputs - 1);

// Out-of-range inputs should abort.
ET_EXPECT_DEATH(method->mutable_input(num_inputs), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->mutable_input(num_inputs + 1), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->mutable_input(num_inputs), ".+ >= .+");
ET_EXPECT_DEATH(method->mutable_input(num_inputs + 1), ".+ >= .+");
}

TEST_F(MethodTest, GetOutputTests) {
Expand All @@ -174,8 +174,8 @@ TEST_F(MethodTest, GetOutputTests) {
method->get_output(num_outputs - 1);

// Out-of-range outputs should abort.
ET_EXPECT_DEATH(method->get_output(num_outputs), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->get_output(num_outputs + 1), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->get_output(num_outputs), ".+ >= .+");
ET_EXPECT_DEATH(method->get_output(num_outputs + 1), ".+ >= .+");
}

TEST_F(MethodTest, MutableOutputTests) {
Expand All @@ -191,8 +191,8 @@ TEST_F(MethodTest, MutableOutputTests) {
method->mutable_output(num_outputs - 1);

// Out-of-range outputs should abort.
ET_EXPECT_DEATH(method->mutable_output(num_outputs), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->mutable_output(num_outputs + 1), "[0-9]+ >= [0-9]+");
ET_EXPECT_DEATH(method->mutable_output(num_outputs), ".+ >= .+");
ET_EXPECT_DEATH(method->mutable_output(num_outputs + 1), ".+ >= .+");
}

TEST_F(MethodTest, SetPrimInputTest) {
Expand Down
5 changes: 2 additions & 3 deletions test/utils/DeathTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@
#define ET_EXPECT_DEATH(_statement, _matcher) ((void)0)
#define ET_EXPECT_DEATH_NO_PAL_INIT(_statement, _matcher) ((void)0)

#elif defined(_WIN32) || !ET_LOG_ENABLED
#elif !ET_LOG_ENABLED

/**
* On Windows, death test stderr matching is unreliable.
* When logging is disabled, ET_CHECK_MSG doesn't output error messages.
* In both cases, we ignore the matcher and only verify that the statement
* In this case, we ignore the matcher and only verify that the statement
* causes the process to terminate.
*/
#define ET_EXPECT_DEATH(_statement, _matcher) \
Expand Down
Loading