[kmymoney] [Bug 491914] New: mymoneyfinancialcalculator-test fails with mingw-builds

Ralf Habacker bugzilla_noreply at kde.org
Mon Aug 19 19:15:23 BST 2024


https://bugs.kde.org/show_bug.cgi?id=491914

            Bug ID: 491914
           Summary: mymoneyfinancialcalculator-test fails with
                    mingw-builds
    Classification: Applications
           Product: kmymoney
           Version: git (master)
          Platform: Other
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kmymoney-devel at kde.org
          Reporter: ralf.habacker at freenet.de
  Target Milestone: ---

STEPS TO REPRODUCE
1. see appended log

OBSERVED RESULT
Running mymoneyfinancialcalculator-test from a MinGW build fails

7/38 Test  #8: mymoneyfinancialcalculator-test .......***Failed    0.55 sec

Inspecting the test log  shows:

8: ********* Start testing of MyMoneyFinancialCalculatorTest *********
8: Config: Using QtTest library 5.15.14, Qt 5.15.14 (i386-little_endian-ilp32
shared (dynamic) release build; by GCC 13.2.0), windows 7sp1
8: PASS   : MyMoneyFinancialCalculatorTest::initTestCase()
8: PASS   : MyMoneyFinancialCalculatorTest::testEmptyConstructor()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetPrec()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetNpp()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetPF()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetCF()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetBep()
8: PASS   : MyMoneyFinancialCalculatorTest::testSetDisc()
8: FAIL!  : MyMoneyFinancialCalculatorTest::testSetIr() 'm->d_func()->m_ir ==
12.3' returned FALSE. ()
8:
/home/abuild/rpmbuild/BUILD/kmymoney-5.1.80+QT515+KF5103+20240819+git.9e9d8d588/kmymoney/mymoney/tests/mymoneyfinancialcalculator-test.cpp(91)
: failure location
8: FAIL!  : MyMoneyFinancialCalculatorTest::testSetPv() 'm->d_func()->m_pv ==
23.4' returned FALSE. ()
8:
/home/abuild/rpmbuild/BUILD/kmymoney-5.1.80+QT515+KF5103+20240819+git.9e9d8d588/kmymoney/mymoney/tests/mymoneyfinancialcalculator-test.cpp(98)
: failure location
8: PASS   : MyMoneyFinancialCalculatorTest::testSetPmt()
8: FAIL!  : MyMoneyFinancialCalculatorTest::testSetFv() 'm->d_func()->m_fv ==
45.6' returned FALSE. ()
8:
/home/abuild/rpmbuild/BUILD/kmymoney-5.1.80+QT515+KF5103+20240819+git.9e9d8d588/kmymoney/mymoney/tests/mymoneyfinancialcalculator-test.cpp(112)
: failure location
8: PASS   : MyMoneyFinancialCalculatorTest::testCombinedSet()
8: PASS   : MyMoneyFinancialCalculatorTest::testNumPayments()
8: PASS   : MyMoneyFinancialCalculatorTest::testUseCase1()
8: PASS   : MyMoneyFinancialCalculatorTest::testUseCase2()
8: PASS   : MyMoneyFinancialCalculatorTest::cleanupTestCase()
8: Totals: 14 passed, 3 failed, 0 skipped, 0 blacklisted, 5ms
8: ********* Finished testing of MyMoneyFinancialCalculatorTest *********

EXPECTED RESULT
The test should not fail.

ADDITIONAL INFORMATION
> MyMoneyFinancialCalculatorTest::testSetIr() 'm->d_func()->m_ir == 12.3' 

Both numbers are of type double; the comparison of two values with the operator
== may not work due to rounding problems. The use of
QCOMPARE(m->d_func()->m_ir, 12.3), can solve this problem, as this type of
problem is taken into account.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list