Source code for the WriteFreely SwiftUI app for iOS, iPadOS, and macOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

37 lignes
1.3 KiB

  1. import XCTest
  2. class Tests_iOS: XCTestCase {
  3. override func setUpWithError() throws {
  4. // Put setup code here. This method is called before the invocation of each test method in the class.
  5. // In UI tests it is usually best to stop immediately when a failure occurs.
  6. continueAfterFailure = false
  7. // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests
  8. // before they run. The setUp method is a good place to do this.
  9. }
  10. override func tearDownWithError() throws {
  11. // Put teardown code here. This method is called after the invocation of each test method in the class.
  12. }
  13. func testExample() throws {
  14. // UI tests must launch the application that they test.
  15. let app = XCUIApplication()
  16. app.launch()
  17. // Use recording to get started writing UI tests.
  18. // Use XCTAssert and related functions to verify your tests produce the correct results.
  19. }
  20. func testLaunchPerformance() throws {
  21. if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {
  22. // This measures how long it takes to launch your application.
  23. measure(metrics: [XCTApplicationLaunchMetric()]) {
  24. XCUIApplication().launch()
  25. }
  26. }
  27. }
  28. }