77 */
88#include < gtest/gtest.h>
99
10- #include < executorch/kernels/portable/cpu/util/tensor_util.h>
1110#include < executorch/runtime/core/exec_aten/exec_aten.h>
11+ #include < executorch/runtime/core/exec_aten/util/tensor_shape_to_c_string.h>
1212#include < executorch/runtime/platform/runtime.h>
1313#include < array>
1414
@@ -17,7 +17,7 @@ using executorch::runtime::Span;
1717using executorch::runtime::tensor_shape_to_c_string;
1818using executorch::runtime::internal::kMaximumPrintableTensorShapeElement ;
1919
20- TEST (TensorUtilTest, TensorShapeToCStringBasic ) {
20+ TEST (TensorShapeToCStringTest, Basic ) {
2121 std::array<executorch::aten::SizesType, 3 > sizes = {123 , 456 , 789 };
2222 auto str = tensor_shape_to_c_string (
2323 Span<const executorch::aten::SizesType>(sizes.data (), sizes.size ()));
@@ -29,7 +29,7 @@ TEST(TensorUtilTest, TensorShapeToCStringBasic) {
2929 EXPECT_STREQ (str.data (), " (1234567890)" );
3030}
3131
32- TEST (TensorUtilTest, TensorShapeToCStringNegativeItems ) {
32+ TEST (TensorShapeToCStringTest, NegativeItems ) {
3333 std::array<executorch::aten::SizesType, 4 > sizes = {-1 , -3 , -2 , 4 };
3434 auto str = tensor_shape_to_c_string (
3535 Span<const executorch::aten::SizesType>(sizes.data (), sizes.size ()));
@@ -44,7 +44,7 @@ TEST(TensorUtilTest, TensorShapeToCStringNegativeItems) {
4444 EXPECT_EQ (str.data (), " (" + std::to_string (one_size[0 ]) + " )" );
4545 }
4646}
47- TEST (TensorUtilTest, TensorShapeToCStringMaximumElement ) {
47+ TEST (TensorShapeToCStringTest, MaximumElement ) {
4848 std::array<executorch::aten::SizesType, 3 > sizes = {
4949 123 , std::numeric_limits<executorch::aten::SizesType>::max (), 789 };
5050 auto str = tensor_shape_to_c_string (
@@ -60,7 +60,7 @@ TEST(TensorUtilTest, TensorShapeToCStringMaximumElement) {
6060 EXPECT_EQ (str.data (), expected_str);
6161}
6262
63- TEST (TensorUtilTest, TensorShapeToCStringMaximumLength ) {
63+ TEST (TensorShapeToCStringTest, MaximumLength ) {
6464 std::array<executorch::aten::SizesType, kTensorDimensionLimit > sizes;
6565 std::fill (sizes.begin (), sizes.end (), kMaximumPrintableTensorShapeElement );
6666
@@ -78,7 +78,7 @@ TEST(TensorUtilTest, TensorShapeToCStringMaximumLength) {
7878 EXPECT_EQ (expected_str, str.data ());
7979}
8080
81- TEST (TensorUtilTest, TensorShapeToCStringExceedsDimensionLimit ) {
81+ TEST (TensorShapeToCStringTest, ExceedsDimensionLimit ) {
8282 std::array<executorch::aten::SizesType, kTensorDimensionLimit + 1 > sizes;
8383 std::fill (sizes.begin (), sizes.end (), kMaximumPrintableTensorShapeElement );
8484
0 commit comments