K
ken.carlino
Hi,
I have the follwing code, but I can't understand why the assert fail?
I print out the value that I am check, it has the right value, but the
assert still fail.
Here is the code:
// bd.areaPerCent is of type 'float'
cout << a.areaPerCent << endl;
assert (a.areaPerCent == 0.00137389);
Here is the output of the program:
0.00137389
snapshot: ../TestBlockData.cpp:31: void TestBlockData::test1():
Assertion `a.areaPerCent == 0.00137389' failed.
why it fails?
I have the follwing code, but I can't understand why the assert fail?
I print out the value that I am check, it has the right value, but the
assert still fail.
Here is the code:
// bd.areaPerCent is of type 'float'
cout << a.areaPerCent << endl;
assert (a.areaPerCent == 0.00137389);
Here is the output of the program:
0.00137389
snapshot: ../TestBlockData.cpp:31: void TestBlockData::test1():
Assertion `a.areaPerCent == 0.00137389' failed.
why it fails?