Way to make EXPECT_EQ() less type sensitive?

Nick Kledzik kledzik at apple.com
Mon Oct 7 18:35:24 PDT 2013


I really like the unit test harness, except that EXPECT_EQ() is very strict about types being exactly the same.  Are there any tricks for making it less persnickety? 

For instance, I have to use unsigned U on the end here:
   EXPECT_EQ(sect.alignment, 1U);
or UL on:
    EXPECT_EQ(sect.content.size(), 2UL);

Even if I get it building with no errors on my machine, it will often produce errors on the build bots on different OSs.

-Nick





More information about the llvm-commits mailing list