0

I wrote a unit test for my code. The code looks like the following:

bool result = [t1 isSimilarToTransaktion:t2];
if( result )
    NSLog(@"YEAH!!!!");
STAssertEquals( YES, result, @"Not equal" );

Actually I checked that in this particular case result is YES. But the test fails with the error message "Type missmatch". Actually I thought YES and YES are of the same type? Btw: YEAH!!! is plotet when I execute this.

Oh I just replaced STAssertEquals with STAssertTrue but it is still a mystery to me

toom
  • 12,864
  • 27
  • 89
  • 128

1 Answers1

1

Your type for result should be BOOL, not bool.

Alternatively you could check for "true" instead of "YES".

StilesCrisis
  • 15,972
  • 4
  • 39
  • 62