| 26 | namespace { |
| 27 | |
| 28 | TEST(GraphUtilsTest, GetFirstElementIndexWithPredicate) { |
| 29 | std::vector<int> vec({1, 2, 3, 4, 5, 6}); |
| 30 | auto result = GetFirstElementIndexWithPredicate( |
| 31 | [](int elem) { return elem % 3 == 0; }, vec); |
| 32 | |
| 33 | EXPECT_EQ(result, 2); |
| 34 | |
| 35 | result = GetFirstElementIndexWithPredicate( |
| 36 | [](int elem) { return elem % 7 == 0; }, vec); |
| 37 | EXPECT_EQ(result, -1); |
| 38 | } |
| 39 | |
| 40 | TEST(GraphUtilsTest, AddScalarConstNodeBool) { |
| 41 | GraphDef graph_def; |
nothing calls this directly
no test coverage detected