mirror of
https://github.com/google/gtm-session-fetcher
synced 2026-11-09 22:25:56 +05:45
Add some tests to ensure imports are working as expected for SwiftPM.
These are inspired by the GoogleUtilities tests that do the same sorta thing.
This commit is contained in:
1 parent
c2e2cd3232
commit
5ac178d832
5 files changed
+122
-1
No files matched your search
@@ -5,6 +5,7 @@ on:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'Sources/**'
|
||||
- 'SwiftPMTests/**'
|
||||
- 'UnitTests/**'
|
||||
- 'Package*.swift'
|
||||
- '.github/workflows/swiftpm.yml'
|
||||
@@ -12,6 +13,7 @@ on:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'Sources/**'
|
||||
- 'SwiftPMTests/**'
|
||||
- 'UnitTests/**'
|
||||
- 'Package*.swift'
|
||||
- '.github/workflows/swiftpm.yml'
|
||||
|
||||
+19
-1
@@ -54,6 +54,24 @@ let package = Package(
|
||||
// - https://forums.swift.org/t/5-3-resources-support-not-working-on-with-swift-test/40381
|
||||
// - https://bugs.swift.org/browse/SR-13560
|
||||
exclude: ["Data"]
|
||||
)
|
||||
),
|
||||
.testTarget(
|
||||
name: "swift-test",
|
||||
dependencies: [
|
||||
"GTMSessionFetcherCore",
|
||||
"GTMSessionFetcherFull",
|
||||
"GTMSessionFetcherLogView",
|
||||
],
|
||||
path: "SwiftPMTests/SwiftImportTest"
|
||||
),
|
||||
.testTarget(
|
||||
name: "objc-import-test",
|
||||
dependencies: [
|
||||
"GTMSessionFetcherCore",
|
||||
"GTMSessionFetcherFull",
|
||||
"GTMSessionFetcherLogView",
|
||||
],
|
||||
path: "SwiftPMTests/ObjCImportTest"
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
#import "GTMSessionFetcher/GTMSessionFetcher.h"
|
||||
#import "GTMSessionFetcher/GTMSessionUploadFetcher.h"
|
||||
#import "GTMSessionFetcher/GTMSessionFetcherLogging.h"
|
||||
#import "GTMSessionFetcher/GTMSessionFetcherService.h"
|
||||
#import "GTMSessionFetcher/GTMMIMEDocument.h"
|
||||
#import "GTMSessionFetcher/GTMGatherInputStream.h"
|
||||
#import "GTMSessionFetcher/GTMReadMonitorInputStream.h"
|
||||
#import "GTMSessionFetcher/GTMSessionFetcherLogViewController.h"
|
||||
|
||||
#import <GTMSessionFetcher/GTMSessionFetcher.h>
|
||||
#import <GTMSessionFetcher/GTMSessionUploadFetcher.h>
|
||||
#import <GTMSessionFetcher/GTMSessionFetcherLogging.h>
|
||||
#import <GTMSessionFetcher/GTMSessionFetcherService.h>
|
||||
#import <GTMSessionFetcher/GTMMIMEDocument.h>
|
||||
#import <GTMSessionFetcher/GTMGatherInputStream.h>
|
||||
#import <GTMSessionFetcher/GTMReadMonitorInputStream.h>
|
||||
#import <GTMSessionFetcher/GTMSessionFetcherLogViewController.h>
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface HeadersImportTest : XCTestCase
|
||||
@end
|
||||
|
||||
@implementation HeadersImportTest
|
||||
|
||||
- (void)testImports {
|
||||
XCTAssertTrue(YES);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
@import GTMSessionFetcherCore;
|
||||
@import GTMSessionFetcherFull;
|
||||
@import GTMSessionFetcherLogView;
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface ModulesImportTest : XCTestCase
|
||||
@end
|
||||
|
||||
@implementation ModulesImportTest
|
||||
|
||||
- (void)testImports {
|
||||
XCTAssertTrue(YES);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,26 @@
|
||||
// Copyright 2022 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import Foundation
|
||||
import GTMSessionFetcherCore
|
||||
import GTMSessionFetcherFull
|
||||
import GTMSessionFetcherLogView
|
||||
|
||||
import XCTest
|
||||
|
||||
class ImportTests: XCTestCase {
|
||||
func testImports() throws {
|
||||
XCTAssertTrue(true)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user