summaryrefslogtreecommitdiffstats
path: root/vcl/qa/cppunit/mapmode.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-06 16:34:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-06 16:35:53 +0200
commit187d7f8f527217c1f958feec7d3a83f866a8e477 (patch)
tree501ec90fe10c8d67fe584be95fb03b976bd152e5 /vcl/qa/cppunit/mapmode.cxx
parentdrop unused STD_MASKCOLOR defines (diff)
downloadcore-187d7f8f527217c1f958feec7d3a83f866a8e477.tar.gz
core-187d7f8f527217c1f958feec7d3a83f866a8e477.zip
CPPUNIT_ASSERT[_DOUBLES]_EQUAL
Change-Id: I417cea926abcc511e74a090ee90a851c138ac0c0
Diffstat (limited to 'vcl/qa/cppunit/mapmode.cxx')
-rw-r--r--vcl/qa/cppunit/mapmode.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/mapmode.cxx b/vcl/qa/cppunit/mapmode.cxx
index d4c7e820d4a6..94e6d4be321c 100644
--- a/vcl/qa/cppunit/mapmode.cxx
+++ b/vcl/qa/cppunit/mapmode.cxx
@@ -45,17 +45,17 @@ void VclMapModeTest::testMultiplier()
aMapMode.SetMapUnit( MapUnit::MapCM );
CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::MapCM, multiplier should be 1000", aMapMode.GetUnitMultiplier() == 1000 );
aMapMode.SetMapUnit( MapUnit::Map1000thInch );
- CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::Map1000thInch, multiplier should be 2.54", aMapMode.GetUnitMultiplier() == 2.54 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Map mode is MapUnit::Map1000thInch, multiplier should be 2.54", 2.54, aMapMode.GetUnitMultiplier(), 1E-12 );
aMapMode.SetMapUnit( MapUnit::Map100thInch );
- CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::Map100thInch, multiplier should be 2.54", aMapMode.GetUnitMultiplier() == 25.4 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Map mode is MapUnit::Map100thInch, multiplier should be 2.54", 25.4, aMapMode.GetUnitMultiplier(), 1E-12 );
aMapMode.SetMapUnit( MapUnit::Map10thInch );
CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::Map10thInch, multiplier should be 254", aMapMode.GetUnitMultiplier() == 254 );
aMapMode.SetMapUnit( MapUnit::MapInch );
CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::MapInch, multiplier should be 2540", aMapMode.GetUnitMultiplier() == 2540 );
aMapMode.SetMapUnit( MapUnit::MapTwip );
- CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::MapTwip, multiplier should be 1.76388889", aMapMode.GetUnitMultiplier() == 1.76388889 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Map mode is MapUnit::MapTwip, multiplier should be 1.76388889", 1.76388889, aMapMode.GetUnitMultiplier(), 1E-12 );
aMapMode.SetMapUnit( MapUnit::MapPoint );
- CPPUNIT_ASSERT_MESSAGE( "Map mode is MapUnit::MapPoint, multiplier should be 35.27777778", aMapMode.GetUnitMultiplier() == 35.27777778 );
+ CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Map mode is MapUnit::MapPoint, multiplier should be 35.27777778", 35.27777778, aMapMode.GetUnitMultiplier(), 1E-12 );
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclMapModeTest);