• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Protocol Buffers - Google's data interchange format
2// Copyright 2013 Google Inc.  All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8#import "GPBTestUtilities.h"
9
10//
11// This is just a compile test (here to make sure things never regress).
12//
13// Objective C++ can run into issues with how the NS_ENUM/CF_ENUM declaration
14// works because of the C++ spec being used for that compilation unit. So
15// the fact that these imports all work without errors/warning means things
16// are still good.
17//
18// The "well know types" should have cross file enums needing imports.
19#import "GPBProtocolBuffers.h"
20// Some of the tests explicitly use cross file enums also.
21#import "objectivec/Tests/Unittest.pbobjc.h"
22#import "objectivec/Tests/UnittestImport.pbobjc.h"
23
24// Sanity check the conditions of the test within the Xcode project.
25#if !__cplusplus
26#error This isn't compiled as Objective C++?
27#elif __cplusplus >= 201103L
28// If this trips, it means the Xcode default might have change (or someone
29// edited the testing project) and it might be time to revisit the GPB_ENUM
30// define in GPBBootstrap.h.
31#warning Did the Xcode default for C++ spec change?
32#endif
33
34// Dummy XCTest.
35@interface GPBObjectiveCPlusPlusTests : GPBTestCase
36@end
37
38@implementation GPBObjectiveCPlusPlusTests
39- (void)testCPlusPlus {
40  // Nothing, This was a compile test.
41  XCTAssertTrue(YES);
42}
43@end
44