ios - Xcode Test not detect my class -


i have class named meal.swift in project , unit test

func testmealinitialization() {     // success case.     let potentialitem = meal(name: "newest meal", photo: nil, rating: 5)     xctassertnotnil(potentialitem)      // failure cases.     let noname = meal(name: "", photo: nil, rating: 0)     xctassertnil(noname, "empty name invalid")  } 

but problem that: use of unresolved identifier "meal"

@testable import myapp should work fine. remember set appropriate configurations within debug uitest target.

enter image description here


Comments