| 67 | }; |
| 68 | |
| 69 | TEST(GatherOpTest, Shuffle) { |
| 70 | GatherOpModel m({TensorType_FLOAT32, {2, 2}}, {TensorType_INT32, {2}}); |
| 71 | m.SetInput<float>({-2.0, 0.2, 0.7, 0.8}); |
| 72 | m.SetPositions<int32_t>({1, 0}); |
| 73 | m.Invoke(); |
| 74 | EXPECT_THAT(m.GetOutput<float>(), |
| 75 | ElementsAreArray(ArrayFloatNear({0.7, 0.8, -2, 0.2}))); |
| 76 | } |
| 77 | |
| 78 | TEST(GatherOpTest, Test0DIndex) { |
| 79 | GatherOpModel m({TensorType_FLOAT32, {2, 2}}, {TensorType_INT32, {}}); |
nothing calls this directly
no test coverage detected