Commit Graph

55 Commits

Author SHA1 Message Date
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Daniel Marjamäki 051d42ae6b astyle formatting 2014-11-20 14:20:09 +01:00
orbitcowboy f5d804f71a running astyle 2014-11-20 10:13:03 +01:00
Dmitry-Me 1e298a31cf Refactoring tests. Use utility function to warn about unsimplified code in tests. 2014-09-13 12:59:32 +02:00
PKEuS f5730a7d12 Flush stdout after putchar('.') to ensure that the characters are printed immediately as a progress indicator. 2014-08-05 13:22:40 +02:00
PKEuS bcf3a1e9e1 Refactorization: Moved code out of macro TEST_CASE 2014-08-05 12:55:46 +02:00
PKEuS ec1bd420a7 Refactorizations optimizing std::string usage:
1) Added global static const std::string emptyString; object:
-> Replaces some static variables in functions which might be not threadsafe
-> Avoids constructor call (std::string::string(""))
-> Even functions that return an empty string in some branches can return by reference now.
Added to config.h to ensure that it is available everywhere

2) Added overloads for TestFixture::assertEquals for the most common use cases:
-> Moves conversion from const char[] to std::string into a function, reducing code duplication in binary.
2014-06-26 11:51:02 +02:00
PKEuS 9b307cf8e0 Improved readability of testsuite output when ASSERT_EQUALS_MSG fails.
Fixed another true positive in checkbufferoverrun.cpp
AStyle
2014-03-27 16:06:30 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Simon Martin 8ff9696374 OSX's compiler supports C++11 but one needs to use GNU's STL to build cppcheck, that does not have cbegin/end. 2014-02-01 07:40:08 +01:00
PKEuS b775714e3d Moved several hardcoded function names in format string checking into libraries (std.cfg and windows.cfg).
Added support for loading a library in test suite.
2014-01-12 03:44:24 -08:00
Matthias Krüger 4f918e1c8c testsuite: remove function todoAssert() which is unused according to cppcheck. 2014-01-10 21:08:11 +01:00
Matthias Krüger d9ce61a9d6 testsuite: according to cppcheck, the function printTests() is not used, remove it. 2014-01-10 21:08:11 +01:00
Robert Reif b777388fb8 Symbol database: improved type handling (fix problems in previous commit). Ticket: #4952 2013-08-16 05:42:12 +02:00
Daniel Marjamäki 393c75af70 Simplified remaining TestBufferOverrun test cases 2013-04-13 15:49:15 +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
PKEuS 8594eca9cd Made several functions in testsuite.cpp const according to cppcheck suggestions 2012-08-01 11:54:55 -07:00
Edoardo Prezioso fae40c4782 Change every C version of 'size_t' to C++ 'std::size_t'. 2012-07-09 13:30:18 +02:00
Edoardo Prezioso 8d84e5f852 testrunner: assert-like functions should take linenr parameter as a 'unsigned int' (maybe in the future these should be converted to 'size_t'?);
fix discrepancy between 'todoAssertEquals' and 'AssertEquals' so that the parameters 'expected, wanted, actual and current' are 'long long' types.
2012-01-03 15:48:03 +01:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
PKEuS 33f56ebc27 Bugfix for recent testrunner output improvement. Some output was not
formatted well.
2011-12-22 21:41:40 +02:00
PKEuS 8c541151d6 Improvement of testrunner's output
- Separation between failures
- \n is translated into "\\n\n" instead of "\\n", so that a newline is inserted
- Succeeded TODOs are no longer mentioned twice
- Removed "" around messages
2011-12-20 21:05:47 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Pete Johns 098f0bf3e6 Fixed #2526 (Make TODO_ASSERT_EQUALS take three arguments (value, to_be, as_is)?...
Removed replaced EXPECTED with...

WANTED (to-be):     The future expected value.
CURRENT (as-is):    Documenting how cppcheck behaves now.

This removes the need for an ASSERT_EQUALS but enforces the check for every TODO_ASSERT_EQUALS.
2011-01-30 23:20:11 +11:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02: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
Pete Johns 58ddb3b0ab Fixed #2360 (testrunner fails to build in Mac OS X Leopard (10.5) - assert macro vs assert method)
Renamed assert to assert_.

Tested with gcc v4.0.1 on Snow Leopard.
2010-12-28 09:32:36 +11:00
Daniel Marjamäki ba7a3b376e Fixed #2167 (Drop linefeeds from error messages) 2010-11-11 19:54:43 +01:00
Daniel Marjamäki 6601de7681 uninitialized variables: refactoring handling of loop bodies 2010-10-24 18:26:59 +02:00
Pete Johns 97a68bdcee Added `check` target.
Runs the test as per `make test`, but with less verbosity.

    -g GCC-style errors
    -q quiet tests
2010-09-26 13:29:23 +10:00
Kimmo Varis fa0f6edacf Rename ErrorMessage::toText() to ErrorMessage::toString(). 2010-07-14 18:31:05 +03:00
Daniel Marjamki 85afa86da3 astyle formatting 2010-05-14 18:40:37 +02:00
Konrad Windszus c39f80d361 Ticket #1318: Make sure error ids are unique 2010-05-13 22:14:29 +02:00
Daniel Marjamäki c718a7c595 astyle: Update to astyle 1.24 2010-04-15 20:08:51 +02:00
Zachary Blair 2e276576a4 Fixed #1526 (Cppcheck checks redundant configurations) 2010-04-15 18:37:51 +02:00
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Reijo Tomperi a562430f3f Add a few test cases for CppCheck::parseFromArgs 2010-04-06 22:13:23 +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 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
Robert Reif c6263b51b5 Fixed #1324 (show number of tests that don't produce the desired results) 2010-01-29 18:49:07 +01:00
Daniel Marjamäki 829a4f8453 Fixed #1084 (define configuration lost) 2009-12-13 17:18:27 +01:00
Reijo Tomperi fdde2182b9 Fix GPL comments in all files. ">." was missing from the end. 2009-09-27 18:08:31 +03:00
Slava Semushin d04eeb4fd4 Fixed ticket #481 (testrunner should exit with non-zero status if one of tests fails)
http://sourceforge.net/apps/trac/cppcheck/ticket/481
2009-07-18 19:08:10 +07:00
Daniel Marjamäki 59372199e3 Revert "cppcheck: Now it's possible to change the output format, for example to a visual studio compliant format"
This reverts commit 91a8dbd7b9.
2009-07-10 22:38:26 +02:00
Daniel Marjamäki 91a8dbd7b9 cppcheck: Now it's possible to change the output format, for example to a visual studio compliant format 2009-07-08 14:38:13 +02: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 b49997e69d bail out instead of crash when parsing unicode code (#207) 2009-04-27 21:29:03 +02:00
Reijo Tomperi fc8f47145a Copyrights updated 2009-03-01 19:52:33 +00:00
Reijo Tomperi 9b9223480d Refactoring: reportErr takes now only one parameter, ErrorLogger::ErrorMessage, which contains all required information and also some help
functions for formatting it for output.
2009-02-10 21:51:52 +00:00