diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 08:58:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-29 15:12:26 +0100 |
commit | 41eeaace84b45c803fff3ebd5ab981f0ad09393b (patch) | |
tree | 0a0290bcc852507efa8241bd0853ebdd84ec9cbf /tools/qa/cppunit/test_date.cxx | |
parent | tdf#42949 Fix IWYU warnings in sd/inc ; sd/source/ui/inc/ (diff) | |
download | core-41eeaace84b45c803fff3ebd5ab981f0ad09393b.tar.gz core-41eeaace84b45c803fff3ebd5ab981f0ad09393b.zip |
loplugin:oncevar
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd
Reviewed-on: https://gerrit.libreoffice.org/62498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/qa/cppunit/test_date.cxx')
-rw-r--r-- | tools/qa/cppunit/test_date.cxx | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/tools/qa/cppunit/test_date.cxx b/tools/qa/cppunit/test_date.cxx index 7e1119e93b68..ca6c39d84109 100644 --- a/tools/qa/cppunit/test_date.cxx +++ b/tools/qa/cppunit/test_date.cxx @@ -192,32 +192,27 @@ void DateTest::testGetDaysInYear() { { Date aDate(1, 1, 2000); - sal_uInt16 nExpectedDays = 366; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInYear()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(366), aDate.GetDaysInYear()); } { Date aDate(1, 1, 1900); - sal_uInt16 nExpectedDays = 365; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInYear()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(365), aDate.GetDaysInYear()); } { Date aDate(1, 1, 1999); - sal_uInt16 nExpectedDays = 365; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInYear()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(365), aDate.GetDaysInYear()); } { Date aDate(1, 1, 2004); - sal_uInt16 nExpectedDays = 366; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInYear()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(366), aDate.GetDaysInYear()); } { Date aDate(1, 1, 400); - sal_uInt16 nExpectedDays = 366; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInYear()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(366), aDate.GetDaysInYear()); } } @@ -469,80 +464,67 @@ void DateTest::testGetDaysInMonth() { { Date aDate(1, 1, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 2, 2000); - sal_uInt16 nExpectedDays = 29; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(29), aDate.GetDaysInMonth()); } { Date aDate(1, 2, 1999); - sal_uInt16 nExpectedDays = 28; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(28), aDate.GetDaysInMonth()); } { Date aDate(1, 3, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 4, 2000); - sal_uInt16 nExpectedDays = 30; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), aDate.GetDaysInMonth()); } { Date aDate(1, 5, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 6, 2000); - sal_uInt16 nExpectedDays = 30; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), aDate.GetDaysInMonth()); } { Date aDate(1, 7, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 8, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 9, 2000); - sal_uInt16 nExpectedDays = 30; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), aDate.GetDaysInMonth()); } { Date aDate(1, 10, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } { Date aDate(1, 11, 2000); - sal_uInt16 nExpectedDays = 30; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(30), aDate.GetDaysInMonth()); } { Date aDate(1, 12, 2000); - sal_uInt16 nExpectedDays = 31; - CPPUNIT_ASSERT_EQUAL(nExpectedDays, aDate.GetDaysInMonth()); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(31), aDate.GetDaysInMonth()); } } |