swiftformatting
This commit is contained in:
Родитель
2e40c74a1b
Коммит
add1d40ebc
|
@ -32,5 +32,4 @@ class demoapp_ios_swift: XCTestCase {
|
|||
// Use recording to get started writing UI tests.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,9 +43,9 @@ class AnalyticsViewController: UIViewController {
|
|||
// OK Button
|
||||
alert.addAction(UIAlertAction(title: "OK",
|
||||
style: .default,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
}))
|
||||
self.present(alert, animated:true, completion: nil)
|
||||
present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func presentColorPropertyAlert() {
|
||||
|
@ -57,7 +57,7 @@ class AnalyticsViewController: UIViewController {
|
|||
// Yellow button
|
||||
alert.addAction(UIAlertAction(title: "Yellow",
|
||||
style: .default,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
}))
|
||||
// sent yellow event here
|
||||
MSAnalytics.trackEvent("Color event", withProperties: ["Color": "Yellow"])
|
||||
|
@ -65,7 +65,7 @@ class AnalyticsViewController: UIViewController {
|
|||
// Blue button
|
||||
alert.addAction(UIAlertAction(title: "Blue",
|
||||
style: .default,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
}))
|
||||
// sent blue event here
|
||||
MSAnalytics.trackEvent("Color event", withProperties: ["Color": "Blue"])
|
||||
|
@ -73,11 +73,11 @@ class AnalyticsViewController: UIViewController {
|
|||
// Red button
|
||||
alert.addAction(UIAlertAction(title: "Red",
|
||||
style: .default,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
}))
|
||||
// sent red event here
|
||||
MSAnalytics.trackEvent("Color event", withProperties: ["Color": "Red"])
|
||||
|
||||
self.present(alert, animated:true, completion: nil)
|
||||
present(alert, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
MSMobileCenter.start("<APP SECRET HERE>", withServices: [
|
||||
MSAnalytics.self,
|
||||
MSCrashes.self,
|
||||
MSPush.self
|
||||
MSPush.self,
|
||||
])
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -28,18 +28,17 @@ class CrashViewController: UIViewController {
|
|||
// Cancel Button
|
||||
alert.addAction(UIAlertAction(title: "Cancel",
|
||||
style: UIAlertActionStyle.default,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
}))
|
||||
// Crash App button
|
||||
alert.addAction(UIAlertAction(title: "Crash app",
|
||||
style: UIAlertActionStyle.destructive,
|
||||
handler: { (action) in alert.dismiss(animated: true, completion: nil)
|
||||
handler: { _ in alert.dismiss(animated: true, completion: nil)
|
||||
// generate test crash
|
||||
MSCrashes.generateTestCrash()
|
||||
fatalError()
|
||||
}))
|
||||
|
||||
self.present(alert, animated:true, completion: nil)
|
||||
present(alert, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,5 +26,4 @@ class demoapp_ios_swiftTests: XCTestCase {
|
|||
let vc = CrashViewController()
|
||||
XCTAssertNotNil(vc.view, "View did not load for CrashViewController.")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ class demoapp_ios_swiftUITests: XCTestCase {
|
|||
continueAfterFailure = false
|
||||
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
|
||||
XCUIApplication().launch()
|
||||
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
|
@ -30,5 +29,4 @@ class demoapp_ios_swiftUITests: XCTestCase {
|
|||
func testTrue() {
|
||||
XCTAssert(true)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче