qfuzzycompare error
Solved
General and Desktop
-
Hi,
I need to create a Unit test in order to check if 2 floating numbers are equal. Appearetnly you can't use QCompare for that. If I use qfuzzycompare I get the following error.
test.cpp:36: Fehler: call to 'qFuzzyCompare' is ambiguous
Here's the code.
void test::testSaldo() { importieren imp; qFuzzyCompare(imp.getKonten(12345678)->getSaldo(), 1234.01); }
-
That was it. Thanks a lot.
-
@tactical77 You're welcome! Please don't forget to mark you question as solved.
-
You CAN use QCOMPARE, because it uses fuzzy compare for doubles behind the scenes, as the linked docu states.
Regards