Use a different test name for testConversionToStringView (#139448)

Summary:
The change comes from D65214804 (https://github.com/pytorch/pytorch/pull/139239)

`buck2 test @//fbobjc/mode/buck2/ios-tests fbsource//xplat/caffe2/c10:c10_testApple` doesn't like having 2 `testConversionToString` in the same suite `StringViewTest`, so just need to use a different name there.

Test Plan: `buck2 test @//fbobjc/mode/buck2/ios-tests fbsource//xplat/caffe2/c10:c10_testApple` passes

Differential Revision: D65314266

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139448
Approved by: https://github.com/cyyever, https://github.com/malfet
This commit is contained in:
Huy Do 2024-11-01 13:25:16 +00:00 committed by PyTorch MergeBot
parent e6e140c3d7
commit 560a0704c5

View file

@ -106,7 +106,7 @@ TEST(StringViewTest, testConversionToString) {
} // namespace test_conversion_to_string
namespace test_conversion_to_std_string_view {
TEST(StringViewTest, testConversionToString) {
TEST(StringViewTest, testConversionToStringView) {
c10::string_view empty;
EXPECT_EQ(0, std::string_view(empty).size());
c10::string_view hello_sv = "hello";