Commit Graph

154 Commits

Author SHA1 Message Date
Daniel Marjamäki c3d1274db3 Reverted 'simplify NOT' since there are problems related to signedness of numeric values. 2013-04-24 06:32:34 +02:00
Ettl Martin 33cfc1a52e fixed #4726: simplify bitwise Not (~ %num%) 2013-04-11 09:16:40 +02:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
Daniel Marjamäki 4e92f8dfcd Fixed #4295 (False positive: Expression '(X & 0xFF00000000000000LL)==0xa00000000000000' always evaluates to false (64-bit value)) 2012-11-27 17:37:49 +01:00
XhmikosR 3c14e4b52a test: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-17 13:51:40 +02:00
Daniel Marjamäki 64faa780fe Fixed #4087 (div by zero check is invalid for floats) 2012-09-11 16:50:42 +02:00
PKEuS 77b5175ec3 Support 0B... syntax for binary numbers. 2012-09-11 08:39:01 +02:00
PKEuS 95f4bb3e97 Implemented support for binary numbers (#4113) 2012-09-10 21:13:32 +02:00
PKEuS 0c812c5ac3 Throw an InternalError when trying to divide (or modulo) by zero in MathLib. 2012-09-06 20:15:32 +02:00
PKEuS f969530e1f Revert "Fixed #4087" which was committed by accident.
This reverts commit 0bbef8d803.
2012-09-05 13:57:57 +02:00
PKEuS 0bbef8d803 Fixed #4087 2012-09-04 21:50:50 +02:00
deepak gupta 24659dee92 Fixed #4087 2012-09-02 14:26:39 +02:00
Daniel Marjamäki d24badbfda Fixed #4068 (Endless loop inside MathLib::add()) 2012-08-22 20:50:39 +02:00
Daniel Marjamäki 1601baa974 Fixed #4016 (false positive: incorrectLogicOperator) 2012-08-14 16:17:18 +02:00
PKEuS 003a9be3ed Refactorizations: Made several test functions const according to cppcheck messages. 2012-08-02 02:13:09 -07:00
Ettl Martin 7be01da8e9 fixed ticket 3693. Added modulus operator to Mathlib + unittests. Added a test to checkother to ensure the testcase of ticket 3693 does not trigger an error message. 2012-04-12 14:02:09 +02:00
Reijo Tomperi 194327048a Add InternalError and change MathLib to throw it in case of an error.
- Previously MathLib errors did not provide a filename, but after this change at least source file name should be printed
and if token is provided, also line number should be printed.
- Change also Token to use InternalError
- Modify Cppcheck-class to catch InternalError instead of Token
- Run dmake to update Makefile
2012-01-08 22:19:44 +02:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Ettl Martin f441a958cd mathlib: fixed #2950: comparison of floating point values 2011-07-29 23:37:40 +02:00
Ettl Martin 80ed0b2ad1 testmathlib: improved testcoverage of mathlib 2011-07-19 09:10:34 +02:00
Daniel Marjamäki 26f017e9c6 scripts: added tabs.pl - in my opinion it is bad to use tabs inside string constants. spaces or \t should be used instead. 2011-02-05 12:53:28 +01:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Ettl Martin 9b66f7a754 #ticket 2429: added a test to the mathlib to ensure the used floating point number is recognized correctly 2011-01-07 12:27:12 +01:00
Daniel Marjamäki eb59bd5fd6 Added -Wconversion compiler flag. The ASSERT_EQUALS_DOUBLE was added that can be used when comparing double values. 2010-12-30 22:56:53 +01:00
vBm 46a11183a5 Fixed some spelling mistakes 2010-12-15 18:45:53 +01:00
Daniel Marjamäki e8ca76e02e Fixed #2200 (MathLib: Calculation overflow) 2010-11-20 10:05:33 +01:00
Ettl Martin 379daa3f24 fixed: wrong testcase from my last commit im testmathlib.cpp 2010-11-15 22:12:25 +01:00
Ettl Martin 88cc29ea0a mathlib: added todo testcases for ticket #2200 2010-11-15 21:03:49 +01:00
Martin Ettl 1382832bd0 mathlib:isInt() now handles calles of 'u' and 'l' correctly; testcases added 2010-05-12 23:49:09 +02:00
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Martin Ettl 622663b8db added a helper function to mathlib::isNullValue(), it checks wheter a string has a null representation or not and returns a boolian result; extended nullchecks in testmathlib.cpp 2010-04-02 22:41:54 +02:00
Martin Ettl 0f284b477d coverage report fix: more testcases for mathlib::isInt() added in order to get a better coverage 2010-04-02 22:18:50 +02:00
Reijo Tomperi a1d0defbc0 astyle fix 2010-04-02 21:42:06 +03:00
Martin Ettl c391a03db6 added acos() check to ticket #1513; added testcases for MathLib::toDoubleNumber(), now double conversion of zeros is handled correctly; changed assertEquals() function of testsuite parameters from unsigned int to double. This is needed to avoid overflow of unsigned int by comparing negative floating point values. 2010-04-02 20:23:37 +02:00
Daniel Marjamäki 8b5aae9adb astyle formatting 2010-04-02 07:32:03 +02:00
Daniel Marjamäki 0cad22314e Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup. 2010-04-02 07:30:58 +02:00
Martin Ettl 193aa7d1d3 astyle fix 2010-04-02 02:21:53 +02:00
Martin Ettl b5fb01c202 ticket #1513 new check: Detecting obviously wrong math call arguments passed to math functions) 2010-04-02 02:19:38 +02:00
Daniel Marjamäki 24c5f4d53c astyle formatting 2009-12-27 17:46:24 +01:00
Martin Ettl c3886a5803 added further testcases to testmathlib::convert(); now the conversion of +-[hexnumber|octalnumber] works correctly 2009-12-27 15:18:18 +01:00
Martin Ettl f06adb18cd added further testcases to testmathlib::isint() 2009-12-27 14:46:47 +01:00
Martin Ettl c2b3cfccc9 extended testcases of mathlib; fixed zero conversion: +0 and -0 is converted to 0 2009-12-27 14:30:23 +01:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Reijo Tomperi ed1c9bed49 Fix ticket #632 (Mathlib isInt() identifies "330L" as not int)
http://sourceforge.net/apps/trac/cppcheck/ticket/632
2009-09-11 23:46:59 +03:00
Reijo Tomperi 8ab26e85cf Don't warn about division by zero if zero if floating point number.
Fix bug from mathlib isInt() and add test case from which few are false positives
2009-09-01 22:06:46 +03:00
Daniel Marjamäki 52856fcbeb ettlmartin: improved the MathLib::IsInt 2009-08-16 18:45:26 +02:00
Slava Semushin e5c0383594 Strip redundant std::string usage from tests.
Done by command:
git grep -l ASSERT_EQUALS | xargs sed -i 's|ASSERT_EQUALS(std::string(\(".\+"\)),|ASSERT_EQUALS(\1,|'

Should be no functional change.
2009-06-01 02:50:25 +07:00
Reijo Tomperi 58eda6e978 Fix ticket #325 (Replace developer names in source files with AUTHORS file)
http://apps.sourceforge.net/trac/cppcheck/ticket/325
2009-05-30 08:48:12 +03:00
Daniel Marjamäki 7803466079 testing mathlib: Test that conversion to numbers work 2009-05-02 11:12:49 +02:00
Daniel Marjamäki 7cddc52d8f mathlib: Fixed todo 3/2=1 2009-04-16 22:06:17 +02:00
Daniel Marjamäki 9a086c118f math lib: 3/2 should result in 1 2009-04-12 18:45:42 +02:00
Daniel Marjamäki 97f5380a2c added testing for mathlib 2009-04-06 19:08:13 +02:00