0
I’m building a project and trying to use google test to compare the result of some functions. The problem is that my functions return double vectors and I can only compare double or whole in google test.
i try to make a:
EXPECT_EQ(resposta, FUNC_lib::litopar(ZZIN,AMASS,MULTPL,frac,dens,checawv));
In which answer is a double vector and Func_lib returns a double vector as well. But it automatically generates the following error:
a nonstatic member reference must be relative to a specific object.
It is not a good idea to compare the equality of floating point numbers, because of the rounding/errors accumulated and the inability to represent Comparing floating point Numbers - Random ASCII.
– Mário Feroldi