Simple function in swift for testing:
func testExample() {
var tagname = "someClass()"
var logger = Device("", "") //unresolved identifier
XCTAssert(true, "Pass")
}
Even after I import my module with "import ", I still cannot use classes from my module. Also though I might have messed something up in the project, but NONE of my sample projects will let me use module classes.
Seems like it should work but might have broken in beta 2.
EDIT: fixed it The IDE didn't pick up the check for the param names. Seems Xcode is still a tad iffy
The problem for me was that I had non-alphanumerical characters in my main target name.
I had to import it the following way (Note the special @testable annotation
)
@testable import my_tutorial_app
I hit the same issue today, not sure if this is only available recently - rather than using import TARGET_NAME
in your test file and/or declaring your classes/methods as public
, you can add your file to your Tests target via XCode's File Inspector
.
Cmd
+ Opt
+ 1
to show it while in any file, and check the box under Target Membership
for your Tests Target.
You may need to rebuild.... Cmd
+ b
.
Should this be specific to my system.... I'm running Xcode 6.3 beta 1, and testing via Quick + Nimble, both installed with the latest cocoapods beta.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With