[llvm] b7f298f - [NFC][MLGO] Use ASSERT_TRUE in TFUtilsTest, where appropriate.
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 16:11:01 PST 2022
Author: Mircea Trofin
Date: 2022-01-11T16:10:55-08:00
New Revision: b7f298f17416dec43269c47e9052ae537071bd92
URL: https://github.com/llvm/llvm-project/commit/b7f298f17416dec43269c47e9052ae537071bd92
DIFF: https://github.com/llvm/llvm-project/commit/b7f298f17416dec43269c47e9052ae537071bd92.diff
LOG: [NFC][MLGO] Use ASSERT_TRUE in TFUtilsTest, where appropriate.
Added:
Modified:
llvm/unittests/Analysis/TFUtilsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Analysis/TFUtilsTest.cpp b/llvm/unittests/Analysis/TFUtilsTest.cpp
index 7827f2b83e31c..12f4605fd21b7 100644
--- a/llvm/unittests/Analysis/TFUtilsTest.cpp
+++ b/llvm/unittests/Analysis/TFUtilsTest.cpp
@@ -182,7 +182,7 @@ TEST(TFUtilsTest, Logger) {
L.flush(OS);
tensorflow::SequenceExample Expected;
- EXPECT_TRUE(Expected.ParseFromString(Result));
+ ASSERT_TRUE(Expected.ParseFromString(Result));
PROTO_CHECKER("the_float", float_list, 0, F00);
PROTO_CHECKER("the_float", float_list, 1, F10);
PROTO_CHECKER("alternate_name", int64_list, 0, F01);
@@ -218,7 +218,7 @@ TEST(TFUtilsTest, LoggerInt32FeaturesAndReward) {
L.flush(OS);
tensorflow::SequenceExample Expected;
- EXPECT_TRUE(Expected.ParseFromString(Result));
+ ASSERT_TRUE(Expected.ParseFromString(Result));
PROTO_CHECKER("the_float", float_list, 0, F00);
PROTO_CHECKER("the_float", float_list, 1, F10);
PROTO_CHECKER("alternate_name", int64_list, 0, F01);
@@ -252,7 +252,7 @@ TEST(TFUtilsTest, LoggerNoReward) {
raw_string_ostream OS(Result);
L.flush(OS);
tensorflow::SequenceExample Expected;
- EXPECT_TRUE(Expected.ParseFromString(Result));
+ ASSERT_TRUE(Expected.ParseFromString(Result));
PROTO_CHECKER("the_float", float_list, 0, F00);
PROTO_CHECKER("the_float", float_list, 1, F10);
PROTO_CHECKER("alternate_name", int64_list, 0, F01);
@@ -278,7 +278,7 @@ TEST(TFUtilsTest, LoggerFinalReward) {
const float Zero[]{0.0};
const float R[]{3.14};
tensorflow::SequenceExample Expected;
- EXPECT_TRUE(Expected.ParseFromString(Result));
+ ASSERT_TRUE(Expected.ParseFromString(Result));
PROTO_CHECKER("reward", float_list, 0, Zero);
PROTO_CHECKER("reward", float_list, 1, Zero);
PROTO_CHECKER("reward", float_list, 2, R);
More information about the llvm-commits
mailing list