Bug 96136

Summary: replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL in basic's scanner test
Product: LibreOffice Reporter: Markus Mohrhard <markus.mohrhard>
Component: BASICAssignee: Dipankar Niranjan <dipankar1995>
Status: RESOLVED FIXED    
Severity: normal CC: dtardon, h3734236
Priority: medium Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: target:5.2.0
Crash report or crash signature: Regression By:

Description Markus Mohrhard 2015-11-29 14:46:42 UTC
Replace all possible CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL in the scanner test.

Don't replace places where a function call just returns a boolean. Instead do it for all places where we have a == inside of the CPPUNIT_ASSERT.

basic/qa/cppunit/test_scanner.cxx
Comment 1 David Tardon 2015-11-29 16:27:36 UTC
Note that if the expected value is a numeric literal, you MUST make sure it has the same type as the result (by using a suffix--e.g., 42u--or explicit cast--e.g., size_t(42)), otherwise it WILL fail to build on different platforms.
Comment 2 Robinson Tryon (qubit) 2015-12-10 11:41:03 UTC Comment hidden (obsolete)
Comment 3 Commit Notification 2016-01-04 11:41:58 UTC
Dipangar Niranjar committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0e41527fd52f676ff6240a08b3fe25607c1ca726

tdf#96136 replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Markus Mohrhard 2016-01-04 20:41:28 UTC
Great work. I'm looking forward to your next easy hack.
Comment 5 Robinson Tryon (qubit) 2016-02-18 16:37:20 UTC Comment hidden (obsolete)