views:

64

answers:

1

In the context of iPhone programming, I am using the GHKit for unit testing (gabriel / gh-unit on github).

Here is a failing test assertion :

GHAssertEquals(150, 15, @"someLimit");

and here is the diagnostic from GHKit (shows up in the Simulator and in the Xcode Console) :

    2009-07-25 22:41:12.553 UnitTests[38404:3f07] Exception: '<96000000>' should be equal to '<0f000000>' +/-'(null)'. someLimit

Manifestly, GHKit displays the offending values in little-endian hex.

OK, I can convert to integer values, but why so? Is this a feature or a bug?

+1  A: 

I obtained the answer from the author of GHKit, in the ghunit google groups thread [1], where he wrote ...

Perhaps we need some macros for testing primitives like:

GHAssertEqualIntegers GHAssertEqualInts GHAssertEqualDoubles GHAssertEqualFloats

rudifa