Skip to content

Commit d2c21d7

Browse files
committed
Add test to check for objective-c++ compilation
There are some problems with two headers in clang c++ mode so we need a simple test that compiles as objective-c++
1 parent 98aba8c commit d2c21d7

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

Tests/EXTObjectiveCppCompileTest.h

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// EXTObjectiveCppCompileTest.h
3+
// extobjc
4+
//
5+
// Created by Igor Kashkuta on 2013-04-01.
6+
// Released under the MIT license.
7+
//
8+
9+
#import <SenTestingKit/SenTestingKit.h>
10+
#import "extobjc.h"
11+
12+
@interface EXTObjectiveCppCompileTest : SenTestCase
13+
14+
@end

Tests/EXTObjectiveCppCompileTest.mm

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// EXTObjectiveCppCompileTest.mm
3+
// extobjc
4+
//
5+
// Created by Igor Kashkuta on 2013-04-01.
6+
// Released under the MIT license.
7+
//
8+
9+
#import "EXTObjectiveCppCompileTest.h"
10+
11+
@implementation EXTObjectiveCppCompileTest
12+
13+
@end

extobjc.xcodeproj/project.pbxproj

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
876EE9D6170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 876EE9D5170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm */; };
11+
876EE9D7170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 876EE9D5170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm */; };
1012
D002DAF813656CDF005348A5 /* EXTNilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = D002DAF713656CDF005348A5 /* EXTNilTest.m */; };
1113
D002DAF913656CDF005348A5 /* EXTNilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = D002DAF713656CDF005348A5 /* EXTNilTest.m */; };
1214
D003EEEF15924CF000410411 /* EXTVarargsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = D003EEEE15924CF000410411 /* EXTVarargsTest.m */; };
@@ -211,6 +213,8 @@
211213

212214
/* Begin PBXFileReference section */
213215
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
216+
876EE9D4170B13C000AB73BB /* EXTObjectiveCppCompileTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXTObjectiveCppCompileTest.h; sourceTree = "<group>"; };
217+
876EE9D5170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EXTObjectiveCppCompileTest.mm; sourceTree = "<group>"; };
214218
D002DAF613656CDF005348A5 /* EXTNilTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXTNilTest.h; sourceTree = "<group>"; };
215219
D002DAF713656CDF005348A5 /* EXTNilTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EXTNilTest.m; sourceTree = "<group>"; };
216220
D003EEED15924CF000410411 /* EXTVarargsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXTVarargsTest.h; sourceTree = "<group>"; };
@@ -605,6 +609,8 @@
605609
D0FE94031596668400F3AE1C /* EXTMultimethodTest.m */,
606610
D002DAF613656CDF005348A5 /* EXTNilTest.h */,
607611
D002DAF713656CDF005348A5 /* EXTNilTest.m */,
612+
876EE9D4170B13C000AB73BB /* EXTObjectiveCppCompileTest.h */,
613+
876EE9D5170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm */,
608614
D0D1F93215A396F7002E2387 /* EXTPassthroughTest.h */,
609615
D0D1F93315A396F7002E2387 /* EXTPassthroughTest.m */,
610616
D033765B131E53DB0039ACFD /* EXTPrivateMethodTest.h */,
@@ -945,6 +951,7 @@
945951
D0E6A0F4159BB46D00FB92FC /* EXTAnnotationTest.m in Sources */,
946952
D0D1F93415A396F7002E2387 /* EXTPassthroughTest.m in Sources */,
947953
D0FBB1DB15F6897D002281B9 /* EXTSynthesizeTest.m in Sources */,
954+
876EE9D6170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm in Sources */,
948955
);
949956
runOnlyForDeploymentPostprocessing = 0;
950957
};
@@ -975,6 +982,7 @@
975982
D0E6A0F5159BB46D00FB92FC /* EXTAnnotationTest.m in Sources */,
976983
D0D1F93515A396F7002E2387 /* EXTPassthroughTest.m in Sources */,
977984
D0FBB1DC15F6897D002281B9 /* EXTSynthesizeTest.m in Sources */,
985+
876EE9D7170B13C000AB73BB /* EXTObjectiveCppCompileTest.mm in Sources */,
978986
);
979987
runOnlyForDeploymentPostprocessing = 0;
980988
};

0 commit comments

Comments
 (0)