I am using gtest but I am new to gtest. I would like to do compares of values within two std::vectors of complex data structures. I want to do something like this:
ASSERT_EQ(a.size(), b.size());
for (int x = 0; x < a.size(); x++) {
EXPECT_EQ(
sqrt(pow(a.real[x], 2) + pow(a.imag[x], 2)),
sqrt(pow(b.real[x], 2) + pow(b.imag[x], 2)));
}
This is great in that for mismatches it reports the values that were compared, e.g. 5 != 7, but it does not report the index variable "x". Is there some way I can easily output the index variable when mismatch is detected?