Change unittest variable name

avx_docs
Yu Yang 9 years ago
parent ec790e1050
commit 699d18f117

@ -16,19 +16,19 @@ limitations under the License. */
#include <gtest/gtest.h> #include <gtest/gtest.h>
TEST(Status, testAll) { TEST(Error, testAll) {
paddle::Error status; paddle::Error error;
ASSERT_TRUE(status.isOK()); ASSERT_TRUE(error.isOK());
status = paddle::ErrorF("I'm the error"); error = paddle::ErrorF("I'm the error");
ASSERT_FALSE(status.isOK()); ASSERT_FALSE(error.isOK());
ASSERT_STREQ("I'm the error", status.what()); ASSERT_STREQ("I'm the error", error.what());
status = paddle::ErrorF("error2"); error = paddle::ErrorF("error2");
ASSERT_FALSE(status.isOK()); ASSERT_FALSE(error.isOK());
ASSERT_STREQ("error2", status.what()); ASSERT_STREQ("error2", error.what());
int i = 3; int i = 3;
auto status3 = paddle::ErrorF("error%d", i); auto error3 = paddle::ErrorF("error%d", i);
ASSERT_FALSE(status3.isOK()); ASSERT_FALSE(error3.isOK());
ASSERT_STREQ("error3", status3.what()); ASSERT_STREQ("error3", error3.what());
} }

Loading…
Cancel
Save