Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit tests #18

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.1
119 changes: 0 additions & 119 deletions AnyApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
66FF154928759933003595E3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 66FF154828759933003595E3 /* Assets.xcassets */; };
66FF154C28759933003595E3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 66FF154B28759933003595E3 /* Preview Assets.xcassets */; };
66FF155628759933003595E3 /* AnyAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FF155528759933003595E3 /* AnyAppTests.swift */; };
66FF156028759933003595E3 /* AnyAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FF155F28759933003595E3 /* AnyAppUITests.swift */; };
66FF156228759933003595E3 /* AnyAppUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66FF156128759933003595E3 /* AnyAppUITestsLaunchTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -24,13 +22,6 @@
remoteGlobalIDString = 66FF15402875992F003595E3;
remoteInfo = AnyApp;
};
66FF155C28759933003595E3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 66FF15392875992F003595E3 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 66FF15402875992F003595E3;
remoteInfo = AnyApp;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
Expand All @@ -41,9 +32,6 @@
66FF154B28759933003595E3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
66FF155128759933003595E3 /* AnyAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnyAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
66FF155528759933003595E3 /* AnyAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyAppTests.swift; sourceTree = "<group>"; };
66FF155B28759933003595E3 /* AnyAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnyAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
66FF155F28759933003595E3 /* AnyAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyAppUITests.swift; sourceTree = "<group>"; };
66FF156128759933003595E3 /* AnyAppUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyAppUITestsLaunchTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -61,13 +49,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
66FF155828759933003595E3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -76,7 +57,6 @@
children = (
66FF15432875992F003595E3 /* AnyApp */,
66FF155428759933003595E3 /* AnyAppTests */,
66FF155E28759933003595E3 /* AnyAppUITests */,
66FF15422875992F003595E3 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -86,7 +66,6 @@
children = (
66FF15412875992F003595E3 /* AnyApp.app */,
66FF155128759933003595E3 /* AnyAppTests.xctest */,
66FF155B28759933003595E3 /* AnyAppUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -118,15 +97,6 @@
path = AnyAppTests;
sourceTree = "<group>";
};
66FF155E28759933003595E3 /* AnyAppUITests */ = {
isa = PBXGroup;
children = (
66FF155F28759933003595E3 /* AnyAppUITests.swift */,
66FF156128759933003595E3 /* AnyAppUITestsLaunchTests.swift */,
);
path = AnyAppUITests;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -165,24 +135,6 @@
productReference = 66FF155128759933003595E3 /* AnyAppTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
66FF155A28759933003595E3 /* AnyAppUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 66FF156B28759933003595E3 /* Build configuration list for PBXNativeTarget "AnyAppUITests" */;
buildPhases = (
66FF155728759933003595E3 /* Sources */,
66FF155828759933003595E3 /* Frameworks */,
66FF155928759933003595E3 /* Resources */,
);
buildRules = (
);
dependencies = (
66FF155D28759933003595E3 /* PBXTargetDependency */,
);
name = AnyAppUITests;
productName = AnyAppUITests;
productReference = 66FF155B28759933003595E3 /* AnyAppUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -200,10 +152,6 @@
CreatedOnToolsVersion = 13.4.1;
TestTargetID = 66FF15402875992F003595E3;
};
66FF155A28759933003595E3 = {
CreatedOnToolsVersion = 13.4.1;
TestTargetID = 66FF15402875992F003595E3;
};
};
};
buildConfigurationList = 66FF153C2875992F003595E3 /* Build configuration list for PBXProject "AnyApp" */;
Expand All @@ -221,7 +169,6 @@
targets = (
66FF15402875992F003595E3 /* AnyApp */,
66FF155028759933003595E3 /* AnyAppTests */,
66FF155A28759933003595E3 /* AnyAppUITests */,
);
};
/* End PBXProject section */
Expand All @@ -243,13 +190,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
66FF155928759933003595E3 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -270,15 +210,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
66FF155728759933003595E3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
66FF156028759933003595E3 /* AnyAppUITests.swift in Sources */,
66FF156228759933003595E3 /* AnyAppUITestsLaunchTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand All @@ -287,11 +218,6 @@
target = 66FF15402875992F003595E3 /* AnyApp */;
targetProxy = 66FF155228759933003595E3 /* PBXContainerItemProxy */;
};
66FF155D28759933003595E3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 66FF15402875992F003595E3 /* AnyApp */;
targetProxy = 66FF155C28759933003595E3 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -507,42 +433,6 @@
};
name = Release;
};
66FF156C28759933003595E3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = B57H46XPVY;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = dolenko.com.AnyAppUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = AnyApp;
};
name = Debug;
};
66FF156D28759933003595E3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = B57H46XPVY;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = dolenko.com.AnyAppUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = AnyApp;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -573,15 +463,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
66FF156B28759933003595E3 /* Build configuration list for PBXNativeTarget "AnyAppUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
66FF156C28759933003595E3 /* Debug */,
66FF156D28759933003595E3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 66FF15392875992F003595E3 /* Project object */;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AnyApp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
4 changes: 4 additions & 0 deletions AnyApp/AnyAppApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

import SwiftUI

// dssds
// test
// sdasdas

@main
struct AnyAppApp: App {
var body: some Scene {
Expand Down
30 changes: 20 additions & 10 deletions AnyAppTests/AnyAppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,32 @@ import XCTest
@testable import AnyApp

class AnyAppTests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}


func testExample() throws {

XCTAssertEqual(2*2, 4)

// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
// Any test you write for XCTest can be annotated as throws and async.
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.

XCTAssertTrue(5==5, "test success")
}

func testMult() throws {
XCTAssertEqual(3*3, 9)
XCTAssertEqual(4*4, 16)
}

func testAdd() throws {
XCTAssertEqual(3+3, 6)
// XCTAssertEqual(3+3, 10)
}

func testSub() throws {
XCTAssertEqual(6-3, 3)
}

func testPerformanceExample() throws {
Expand All @@ -32,5 +43,4 @@ class AnyAppTests: XCTestCase {
// Put the code you want to measure the time of here.
}
}

}
41 changes: 0 additions & 41 deletions AnyAppUITests/AnyAppUITests.swift

This file was deleted.

32 changes: 0 additions & 32 deletions AnyAppUITests/AnyAppUITestsLaunchTests.swift

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>B57H46XPVY.dolenko.com.AnyApp</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
p>�907 application-identifier B57H46XPVY.dolenko.com.AnyApp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
p-�(0& !com.apple.security.get-task-allow�
Binary file not shown.
Loading