| 42 | }; |
| 43 | |
| 44 | TEST(ZerosLikeOpModel, ZerosLikeFloat) { |
| 45 | ZerosLikeOpModel m({TensorType_FLOAT32, {2, 3}}); |
| 46 | m.PopulateTensor<float>(m.input(), {-2.0, -1.0, 0.0, 1.0, 2.0, 3.0}); |
| 47 | m.Invoke(); |
| 48 | EXPECT_THAT(m.ExtractVector<float>(m.output()), |
| 49 | ElementsAreArray({0.0, 0.0, 0.0, 0.0, 0.0, 0.0})); |
| 50 | EXPECT_THAT(m.GetTensorShape(m.output()), ElementsAreArray({2, 3})); |
| 51 | } |
| 52 | |
| 53 | TEST(ZerosLikeOpModel, ZerosLikeInt32) { |
| 54 | ZerosLikeOpModel m({TensorType_INT32, {1, 2, 2, 1}}); |
nothing calls this directly
no test coverage detected