Skip to content

Commit 9029cd9

Browse files
committed
Move TestClass to separate file
1 parent ae4e667 commit 9029cd9

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

InterposeKit.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
78C39D8F2483164500B46395 /* InterposeKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 78C39D8E2483164500B46395 /* InterposeKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
1212
78C39D912483165600B46395 /* InterposeKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78C39D902483165600B46395 /* InterposeKit.swift */; };
1313
78C39D932483169300B46395 /* InterposeKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78C39D922483169300B46395 /* InterposeKitTests.swift */; };
14+
78EDB8D5248B9BB500D2F6C1 /* TestClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78EDB8D4248B9BB500D2F6C1 /* TestClass.swift */; };
1415
/* End PBXBuildFile section */
1516

1617
/* Begin PBXContainerItemProxy section */
@@ -35,6 +36,7 @@
3536
78C39DBF248317B400B46395 /* Defaults-Testing.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Defaults-Testing.xcconfig"; sourceTree = "<group>"; };
3637
78C39DC0248317B400B46395 /* Defaults.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Defaults.xcconfig; sourceTree = "<group>"; };
3738
78C39DC1248317B400B46395 /* Defaults-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Defaults-Debug.xcconfig"; sourceTree = "<group>"; };
39+
78EDB8D4248B9BB500D2F6C1 /* TestClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TestClass.swift; path = Tests/InterposeKitTests/TestClass.swift; sourceTree = SOURCE_ROOT; };
3840
/* End PBXFileReference section */
3941

4042
/* Begin PBXFrameworksBuildPhase section */
@@ -89,6 +91,7 @@
8991
isa = PBXGroup;
9092
children = (
9193
78C39D922483169300B46395 /* InterposeKitTests.swift */,
94+
78EDB8D4248B9BB500D2F6C1 /* TestClass.swift */,
9295
78C39D7B2482CC7D00B46395 /* Info-Tests.plist */,
9396
);
9497
path = InterposeTests;
@@ -216,6 +219,7 @@
216219
isa = PBXSourcesBuildPhase;
217220
buildActionMask = 2147483647;
218221
files = (
222+
78EDB8D5248B9BB500D2F6C1 /* TestClass.swift in Sources */,
219223
78C39D912483165600B46395 /* InterposeKit.swift in Sources */,
220224
);
221225
runOnlyForDeploymentPostprocessing = 0;

Tests/InterposeKitTests/InterposeKitTests.swift

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
11
import XCTest
22
@testable import InterposeKit
33

4-
let testClassHi = "Hi from TestClass!"
5-
let testSwizzleAddition = " and Interpose"
6-
let testSubclass = "Subclass is here!"
7-
8-
class TestClass: NSObject {
9-
@objc dynamic func sayHi() -> String {
10-
print(testClassHi)
11-
return testClassHi
12-
}
13-
14-
@objc dynamic func doNothing() { }
15-
}
16-
17-
class TestSubclass: TestClass {
18-
override func sayHi() -> String {
19-
return super.sayHi() + testSubclass
20-
}
21-
}
22-
234
final class InterposeKitTests: XCTestCase {
245

256
override func setUpWithError() throws {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import Foundation
2+
3+
let testClassHi = "Hi from TestClass!"
4+
let testSwizzleAddition = " and Interpose"
5+
let testSubclass = "Subclass is here!"
6+
7+
class TestClass: NSObject {
8+
@objc dynamic func sayHi() -> String {
9+
print(testClassHi)
10+
return testClassHi
11+
}
12+
13+
@objc dynamic func doNothing() { }
14+
}
15+
16+
class TestSubclass: TestClass {
17+
override func sayHi() -> String {
18+
return super.sayHi() + testSubclass
19+
}
20+
}

0 commit comments

Comments
 (0)