瀏覽代碼

Firestore: add a test for formatting an objective-c Class objects (#14328)

Denver Coneybeare 1 年之前
父節點
當前提交
52d9152e5a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Firestore/core/test/unit/util/string_format_apple_test.mm

+ 5 - 0
Firestore/core/test/unit/util/string_format_apple_test.mm

@@ -55,6 +55,11 @@ TEST(StringFormatTest, FSTDescribable) {
   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