5
func testExample() {
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
// some code ...
}
yukarıdaki fonksiyon daima çökmesine ederken AppDelegate erişebilir ve bu hata veriyor Can not: test hedef halinetest Xcode projesinde
Could not cast value of type 'MyAppName.AppDelegate' (0x10dc09e80) to 'MyAppNameTests.AppDelegate' (0x11cc190c0).
bana bu hata veriyor önce XCode sınıf yazma testi ise: Bilinmeyen özellik 'test edilebilir' – Mohammed
Sonra don XCode 7'yi kullanmayın. XCode 7'den önce '@testable' öğesini kaldırın. –
o işe yaramadı, – Mohammed