Question

In my project I have two files Products.h and .m. If I build project and run, I dont get any warnings & errors.

But when I run tests. I catch an error on this piece of source code:

NSArray* fetchItem(NSString* entity, NSSortDescriptor* sortDescriptor = nil);

The error message:

"Clang does not support default params".

Ok, I know, it may be a problem due to the architecture of the project.

I change the architecture in UnitTest as MainProject from $(ARCHS_STANDART_32BIT) to $(ARCHS_UNIVERSAL_IPHONEOS). And all the same catch error

"Expected ';' ',' or ')' before '=' token.

In both projects ARC is off.

So essentially, my question is, "How to enable default params on UnitTest projects?" Thank you very much,

Was it helpful?

Solution

In your code line pls check if u r missing assignment

NSArray* fetchItem = (NSString* entity, NSSortDescriptor* sortDescriptor = nil);

I dont know what you want, coz after assignment that line is not making me any sense.

OTHER TIPS

I found answer. Use default parameters bad syntax and not usage in Objective-C, I remove default param and problem solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top