Skip to content

Commit

Permalink
Update tests to use canImport
Browse files Browse the repository at this point in the history
  • Loading branch information
dfed committed Dec 9, 2023
1 parent 84c1a48 commit 9c07078
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions Tests/SafeDIPluginTests/SafeDIPluginTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
// No root @Instantiable-decorated types found.
"""
Expand Down Expand Up @@ -76,8 +80,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
// No root @Instantiable-decorated types found.
"""
Expand Down Expand Up @@ -124,8 +132,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension RootViewController {
convenience init() {
Expand Down Expand Up @@ -177,8 +189,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
init() {
Expand Down Expand Up @@ -230,8 +246,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
init() {
Expand Down Expand Up @@ -340,8 +360,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension RootViewController {
convenience init() {
Expand Down Expand Up @@ -469,8 +493,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension RootViewController {
convenience init() {
Expand Down Expand Up @@ -599,8 +627,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension RootViewController {
convenience init() {
Expand Down Expand Up @@ -729,8 +761,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension RootViewController {
convenience init() {
Expand Down Expand Up @@ -861,8 +897,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
convenience init() {
Expand Down Expand Up @@ -999,8 +1039,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
convenience init() {
Expand Down Expand Up @@ -1132,8 +1176,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
convenience init() {
Expand Down Expand Up @@ -1274,8 +1322,12 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
convenience init() {
Expand Down Expand Up @@ -1451,11 +1503,21 @@ final class SafeDIPluginTests: XCTestCase {
// Any modifications made to this file will be overwritten on subsequent builds.
// Please refrain from editing this file directly.
#if canImport(ChildModule)
import ChildModule
#endif
#if canImport(GrandchildModule)
import GrandchildModule
#endif
#if canImport(GreatGrandchildModule)
import GreatGrandchildModule
#endif
#if canImport(SwiftUI)
import SwiftUI
#endif
#if canImport(UIKit)
import UIKit
#endif
extension Root {
convenience init() {
Expand Down

0 comments on commit 9c07078

Please sign in to comment.