Note that there are some explanatory texts on larger screens.

plurals
  1. POImported files not recognized in OCUnit
    primarykey
    data
    text
    <p>I am doing unit testing on my iPhone app using OCUnit on XCode 3.2.3, and iOS 4.0. I have successfully set up my testing environment to pass and fail basic tests appropriately, but when I import my own files (in this case, "UserAccount.h", it fails to compile and tells me:</p> <p><strong>"_OBJC_CLASS_$_UserAccount", referenced from:</strong></p> <p>It then says "Symbol(s) not found". This strikes me as some sort of linker error, but I have no idea what's going on. I have built and cleaned all targets numerous times, but to no avail. Here is my testing code:</p> <pre><code>#import "SomeTestCase.h" #import "UserAccount.h" @implementation SomeTestCase - (void)testUserAccount { // UserAccount.m // UserAccount *testAccount = [[UserAccount alloc] initWithUsername:@"" password:@"" deviceToken:@""]; [testAccount registerNew]; NSLog(@"USERID = %@", testAccount.userID); STAssertEquals([testAccount login], NO, @"Failure: Login should fail with blank username and password."); // should fail with no username or password UserAccount *testAccount2 = [[UserAccount alloc] initWithUsername:@"user" password:@"" deviceToken:@""]; STAssertEquals([testAccount2 login], NO, @"Failure: Login should fail with blank password.");// should fail with no password UserAccount *testAccount3 = [[UserAccount alloc] initWithUsername:@"" password:@"pass" deviceToken:@""]; STAssertEquals([testAccount3 login], NO, @"Failure: Login should fail with blank username.");// should fail with no password } @end </code></pre> <p>Any advice would be greatly appreciated. Thanks!</p> <p>-Matt</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload