jeudi 26 mars 2015

Google Test: how to EXPECT_EQ non printable ASCII values

In my test I set an EXPECT_EQ() on a char against some characters like 'a', 'b' etc... so far so good.


Now I should test against a non printable ASCII character (0xFE). My character is defined as 'char' so a direct test against 0xFE will fail



char a;
a = 0xFE;
EXPECT_EQ(a, 0xFE); <-- fail!!!

Aucun commentaire:

Enregistrer un commentaire