diff options
-rw-r--r-- | src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m | 11 | ||||
-rw-r--r-- | src/objective-c/tests/CoreCronetEnd2EndTests/fixture.h (renamed from src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.h) | 7 | ||||
-rw-r--r-- | src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.m | 3 | ||||
-rw-r--r-- | src/objective-c/tests/Tests.xcodeproj/project.pbxproj | 4 |
4 files changed, 16 insertions, 9 deletions
diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m index 097e368674..b0e58fe2ed 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.m @@ -32,7 +32,7 @@ */ #import <XCTest/XCTest.h> -#include "./h2_ssl_cronet.h" +#import "src/objective-c/tests/CoreCronetEnd2EndTests/fixture.h" @interface CoreCronetEnd2EndTests : XCTestCase @@ -42,6 +42,15 @@ - (void)testCoreCronetEnd2End { char *argv[] = {"h2_ssl"}; + + // This main() function is not the entry point of this test case; it + // refers to that in h2_ssl_cronet.m. We can use it because XCode + // builder does not use main() as the entry point for a test. + // Since h2_ssl_cronet.m is derived from h2_ssl.c in the core end2end + // test fixture, we preserves the fixture structure (in particular + // the main() function here) so that another fixture can easily + // replace the fixture h2_ssl_cronet, in case we need more tests in + // the future main(1, argv); } diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.h b/src/objective-c/tests/CoreCronetEnd2EndTests/fixture.h index 3aa0a05dda..31e36a71f2 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.h +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/fixture.h @@ -31,9 +31,4 @@ * */ -#ifndef GRPC_H2_SSL_H -#define GRPC_H2_SSL_H - -int main(int argc, char **argv); - -#endif /* GRPC_H2_SSL_H */
\ No newline at end of file +int main(int argc, char **argv);
\ No newline at end of file diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.m b/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.m index dfa27abf8d..37d98b793c 100644 --- a/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.m +++ b/src/objective-c/tests/CoreCronetEnd2EndTests/h2_ssl_cronet.m @@ -32,6 +32,9 @@ */ /* + * This fixture derives from h2_ssl.c fixture in core end2end test + * (test/core/end2end/fixture/h2_ssl.c) + * * This fixture creates a server full stack using chttp2 and a client * full stack using Cronet. End-to-end tests are run against this fixture * setting. diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index 9b7d23728c..c1fd8afa23 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -110,8 +110,8 @@ 51A275E86C141416ED63FF76 /* Pods-InteropTestsLocalCleartext.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalCleartext.release.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalCleartext/Pods-InteropTestsLocalCleartext.release.xcconfig"; sourceTree = "<group>"; }; 553BBBED24E4162D1F769D65 /* Pods-InteropTestsLocalSSL.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InteropTestsLocalSSL.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InteropTestsLocalSSL/Pods-InteropTestsLocalSSL.debug.xcconfig"; sourceTree = "<group>"; }; 5761E98978DDDF136A58CB7E /* Pods-AllTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AllTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AllTests/Pods-AllTests.release.xcconfig"; sourceTree = "<group>"; }; - 5E1BD3B01D3D583900A47325 /* h2_ssl_cronet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = h2_ssl_cronet.h; sourceTree = "<group>"; }; 5E1BD3B11D3D583900A47325 /* h2_ssl_cronet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = h2_ssl_cronet.m; sourceTree = "<group>"; }; + 5E1BD3B31D3D736C00A47325 /* fixture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fixture.h; sourceTree = "<group>"; }; 5E8A5DA41D3840B4000F8BC4 /* CoreCronetEnd2EndTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreCronetEnd2EndTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoreCronetEnd2EndTests.m; sourceTree = "<group>"; }; 6312AE4D1B1BF49B00341DEE /* GRPCClientTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRPCClientTests.m; sourceTree = "<group>"; }; @@ -252,7 +252,7 @@ 5E8A5DA51D3840B4000F8BC4 /* CoreCronetEnd2EndTests */ = { isa = PBXGroup; children = ( - 5E1BD3B01D3D583900A47325 /* h2_ssl_cronet.h */, + 5E1BD3B31D3D736C00A47325 /* fixture.h */, 5E1BD3B11D3D583900A47325 /* h2_ssl_cronet.m */, 5E8A5DA61D3840B4000F8BC4 /* CoreCronetEnd2EndTests.m */, ); |