I wrote a unit test like below:
class Test445Tests: XCTestCase {
func testPerformanceExample() {
XCTAssert(true)
}
}
When the test runs, something calls ViewController.viewDidLoad! Can someone explain why this happens?
class ViewController: UIViewController {
static var s = false
override func viewDidLoad() {
super.viewDidLoad()
ViewController.s = true // put the debugger here.
}
}
If you write this code and put a debugger on ViewController, you can check that the debugger will stop on that line.

