From 52d9152e5ac3ae6d2fefc872a3a6c1697d26d3e7 Mon Sep 17 00:00:00 2001 From: Denver Coneybeare Date: Fri, 10 Jan 2025 10:37:01 -0500 Subject: [PATCH] Firestore: add a test for formatting an objective-c Class objects (#14328) --- Firestore/core/test/unit/util/string_format_apple_test.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Firestore/core/test/unit/util/string_format_apple_test.mm b/Firestore/core/test/unit/util/string_format_apple_test.mm index fbcc7e85d5f..7585fbdcbd3 100644 --- a/Firestore/core/test/unit/util/string_format_apple_test.mm +++ b/Firestore/core/test/unit/util/string_format_apple_test.mm @@ -55,6 +55,11 @@ - (NSString*)description { EXPECT_EQ("Hello description", StringFormat("Hello %s", desc_id)); } +TEST(StringFormatTest, ObjectiveCClass) { + FSTDescribable* desc = [[FSTDescribable alloc] init]; + EXPECT_EQ("Hello FSTDescribable", StringFormat("Hello %s", [desc class])); +} + } // namespace util } // namespace firestore } // namespace firebase