aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests/GPBMessageTests.m
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2016-03-30 11:43:44 -0700
committerGravatar Jisi Liu <jisi.liu@gmail.com>2016-03-30 11:43:44 -0700
commit0de06f54bc8253ba39eee9e8cc4c5de487a48835 (patch)
treee66dec08e23df554f5c29a1dbb4592388815e4ec /objectivec/Tests/GPBMessageTests.m
parent3b3c8abb9635eb3ea078a821a99c9ef29d66dff7 (diff)
parenta25e9964b126a79e8a99bced2207ddca22d6a1a9 (diff)
Merge branch 'master' of github.com:google/protobuf
Diffstat (limited to 'objectivec/Tests/GPBMessageTests.m')
-rw-r--r--objectivec/Tests/GPBMessageTests.m18
1 files changed, 18 insertions, 0 deletions
diff --git a/objectivec/Tests/GPBMessageTests.m b/objectivec/Tests/GPBMessageTests.m
index 7b37ca95..43546156 100644
--- a/objectivec/Tests/GPBMessageTests.m
+++ b/objectivec/Tests/GPBMessageTests.m
@@ -1820,6 +1820,24 @@
XCTAssertEqualObjects(enumDescriptor, expectedDescriptor);
}
+- (void)testPropertyNaming {
+ // objectivec_helpers.cc has some special handing to get proper all caps
+ // for a few cases to meet objc developer expectations.
+ //
+ // This "test" confirms that the expected names are generated, otherwise the
+ // test itself will fail to compile.
+ ObjCPropertyNaming *msg = [ObjCPropertyNaming message];
+ // On their own, at the end, in the middle.
+ msg.URL = @"good";
+ msg.thumbnailURL = @"good";
+ msg.URLFoo = @"good";
+ msg.someURLBlah = @"good";
+ msg.HTTP = @"good";
+ msg.HTTPS = @"good";
+ // No caps since it was "urls".
+ [msg.urlsArray addObject:@"good"];
+}
+
- (void)testEnumNaming {
// objectivec_helpers.cc has some interesting cases to deal with in
// EnumValueName/EnumValueShortName. Confirm that things generated as