In cxxtest, TS_ASSERT_DIFFERS(a, b) tests !(a == b) and not (a != b). Therefore, to test a::operator!=(b), we must avoid TS_ASSERT_DIFFERS() (that will test !a::operator==(b)) and write instead TS_ASSERT(a != b).