diff options
author | 2018-08-16 12:30:14 -0700 | |
---|---|---|
committer | 2018-08-16 12:33:48 -0700 | |
commit | b09f347b6498edbd0aeeaa1001930e968e80dd49 (patch) | |
tree | 107119745508ea8a78201e1c4155e4ae5a6a89de /tensorflow/contrib/lite/util_test.cc | |
parent | 1326f33515dac82fbdd7ef502d1df5e96986fc12 (diff) |
Refactoring: Extract IsEagerOp function to shared component.
PiperOrigin-RevId: 209027338
Diffstat (limited to 'tensorflow/contrib/lite/util_test.cc')
-rw-r--r-- | tensorflow/contrib/lite/util_test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/util_test.cc b/tensorflow/contrib/lite/util_test.cc index 04579c53aa..32bf917a59 100644 --- a/tensorflow/contrib/lite/util_test.cc +++ b/tensorflow/contrib/lite/util_test.cc @@ -41,6 +41,16 @@ TEST(ConvertVectorToTfLiteIntArray, TestWithEmptyVector) { TfLiteIntArrayFree(output); } +TEST(UtilTest, IsEagerOp) { + EXPECT_TRUE(IsEagerOp("Eager")); + EXPECT_TRUE(IsEagerOp("EagerOp")); + EXPECT_FALSE(IsEagerOp("eager")); + EXPECT_FALSE(IsEagerOp("Eage")); + EXPECT_FALSE(IsEagerOp("OpEager")); + EXPECT_FALSE(IsEagerOp(nullptr)); + EXPECT_FALSE(IsEagerOp("")); +} + } // namespace } // namespace tflite |