tensorflow/lite/kernels/topk_v2_test.cc
// Test when internal dimension is k+1.
Test when internal dimension is k+1.
Test when internal dimension is k + 1 .
TEST_P(TopKV2OpTest, BorderFloat) {
  TopKV2OpModel<float> m(2, {2, 3}, {-2.0, -3.0, 0.2, 0.8, 0.1, -0.1},
                         GetParam());
  m.Invoke();
  EXPECT_THAT(m.GetIndexes(), ElementsAreArray({2, 0, 0, 1}));
  EXPECT_THAT(m.GetValues(),
              ElementsAreArray(ArrayFloatNear({0.2, -2.0, 0.8, 0.1})));
}
TEST_P ( TopKV2OpTest , BorderFloat ) { TopKV2OpModel < float > m ( 2 , { 2 , 3 } , { -2.0 , -3.0 , 0.2 , 0.8 , 0.1 , -0.1 } , GetParam ( ) ) ; m . Invoke ( ) ; EXPECT_THAT ( m . GetIndexes ( ) , ElementsAreArray ( { 2 , 0 , 0 , 1 } ) ) ; EXPECT_THAT ( m . GetValues ( ) , ElementsAreArray ( ArrayFloatNear ( { 0.2 , -2.0 , 0.8 , 0.1 } ) ) ) ; }
Test when internal dimension is k+1.
Test when internal dimension is k + 1 .