AppcircleTests.swift 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // AppcircleTests.swift
  3. // AppcircleTests
  4. //
  5. // Created by Mustafa on 29.12.2021.
  6. //
  7. import XCTest
  8. @testable import Appcircle
  9. class AppcircleTests: XCTestCase {
  10. override func setUpWithError() throws {
  11. // Put setup code here. This method is called before the invocation of each test method in the class.
  12. }
  13. override func tearDownWithError() throws {
  14. // Put teardown code here. This method is called after the invocation of each test method in the class.
  15. }
  16. func testSkipiPhone8() throws {
  17. let simulator = ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] ?? "No Name"
  18. try XCTSkipIf(simulator.contains("iPhone 8"), "Skip this test on iPhone 8*")
  19. XCTAssertTrue(true,"iPhone 8 Test")
  20. }
  21. func testSkipiPhone14() throws {
  22. let simulator = ProcessInfo.processInfo.environment["SIMULATOR_DEVICE_NAME"] ?? "No Name"
  23. try XCTSkipIf(simulator.contains("iPhone 14"), "Skip this test on iPhone 14*")
  24. XCTAssertTrue(true,"iPhone 14 Test")
  25. }
  26. func testExpectedFailure() throws {
  27. let thingThatFails: Bool = false
  28. XCTExpectFailure("Working on a fix for this problem.")
  29. XCTAssertTrue(thingThatFails, "This is not working right now.")
  30. }
  31. func testPass() throws {
  32. XCTAssertTrue(true, "This test should pass")
  33. }
  34. func testFail() throws {
  35. XCTAssertTrue(false,"This test should fail")
  36. }
  37. func testPerformanceExample() throws {
  38. // This is an example of a performance test case.
  39. self.measure {
  40. // Put the code you want to measure the time of here.
  41. }
  42. }
  43. }