cppcheck/test
rikardfalkeborn 491ee577c6 Support floats in valid config (#1297)
* Add tests for invalid ranges

* Refactor loadLibErrors

This reduces the amount of code slightly and will simplify adding
more tests.

* Handle empty valid field

Before this change, the sequence <valid></valid> in a config file would
result in a segmentation fault. Now an empty field results in the error
message:

cppcheck: Failed to load library configuration file 'mycfg.cfg'. Bad attribute value '""'

* Add support for valid for floating point arguments

Previously, it was not possible to add valid ranges to floating point
arguments since it only handled integers. This made ranges not work well
for floating point arguments since arguments were cast to integers
before the ranges were handled.

Fix this by using doubles instead of integers if the argument is a float.
Add some tests for this and make sure errors are printed with enough
precision (somewhat arbitrarily chosen).

Note that it is still only possible to add integer ranges (i.e. -1:1).

* Add support for floats in configuration valid range

Now that it is possible to handle decimal arguments, there is no reason
to not allow non-integer ranges. Take care to not allow broken
configurations.

* Move check to within if-clause

* Move asin{,f,l} and acos{,f,l} input checks to config file
2018-07-15 22:47:56 +02:00
..
cfg runtest.sh: Bugfix cfg dir when run in test/cfg (#1311) 2018-07-15 22:24:31 +02:00
synthetic Improve Python code 2017-06-05 13:23:00 +02:00
CMakeLists.txt Fixed #7660 (cmake build does not handle simplecpp) 2016-08-06 18:21:54 +02:00
options.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
options.h Updated copyright year 2018-01-14 15:37:52 +01:00
redirect.h Updated copyright year 2018-01-14 15:37:52 +01:00
test.cxx
test64bit.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testassert.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testastutils.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testautovariables.cpp Use Variable::valueType instead of Variable::typeStartToken in auto variables 2018-06-24 08:25:19 +02:00
testbool.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testboost.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testbufferoverrun.cpp Fix crash bug #8579 (#1238) 2018-05-25 07:15:05 +02:00
testcharvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testclass.cpp Fixed #8573 (FP noCopyConstructor - derive from noncopyable class) 2018-06-06 16:02:25 +02:00
testcmdlineparser.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testcondition.cpp Fix issue 7904: Handle double nots in isSameExpression (#1305) 2018-07-15 11:30:02 +02:00
testconstructors.cpp CheckClass: Restore a few warnings about member initialization of classes 2018-06-29 22:54:12 +02:00
testcppcheck.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testerrorlogger.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testexceptionsafety.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfilelister.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testfiles.pri testrunner: Add testplatform to verify platform loading (#1176) 2018-04-18 16:12:35 +02:00
testfunctions.cpp Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
testgarbage.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testimportproject.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testincompletestatement.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testinternal.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testio.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testleakautovar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testlibrary.cpp Support floats in valid config (#1297) 2018-07-15 22:47:56 +02:00
testmathlib.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testmemleak.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testnullpointer.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testoptions.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testother.cpp Fix issue 7904: Handle double nots in isSameExpression (#1305) 2018-07-15 11:30:02 +02:00
testpath.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testpathmatch.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testplatform.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpostfixoperator.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testpreprocessor.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testrunner.cpp Updated copyright year 2018-01-14 15:37:52 +01:00
testrunner.vcxproj Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testrunner.vcxproj.filters Visual Studio: testrunner: Add missing testastutils (#1186) 2018-04-23 20:03:06 +02:00
testsamples.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsimplifytemplate.cpp astyle formatting 2018-05-31 07:02:08 +02:00
testsimplifytokens.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsimplifytypedef.cpp Fixed #7406 (Tokenizer::simplifyTypedef: array typedef used as template parameter) (#1257) 2018-05-22 17:31:58 +02:00
testsizeof.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
teststl.cpp Fixed #8360 (false positive "Ineffective call of function 'empty()'") 2018-07-10 22:58:02 +02:00
teststring.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsuite.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testsuite.h Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testsuppressions.cpp inline suppressions: treat arithmetic operators as start-of-comment 2018-06-09 22:50:51 +02:00
testsymboldatabase.cpp Extend TestSymbolDatabase::findFunction19 to outline different results depending whether char is signed or unsigned on compile time 2018-06-28 22:16:18 +02:00
testthreadexecutor.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtimer.cpp Fix testrunner compiling 2018-06-16 22:28:14 +02:00
testtoken.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtokenize.cpp windows.cfg: Improved support for more types. 2018-05-16 16:26:40 +02:00
testtokenlist.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testtype.cpp Fixed #8575 (false positive: longCastAssign) 2018-06-04 22:51:21 +02:00
testuninitvar.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testunusedfunctions.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testunusedprivfunc.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testunusedvar.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testutils.h Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvaarg.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00
testvalueflow.cpp Fix override warnings. (#1234) 2018-05-15 16:37:40 +02:00
testvarid.cpp Updated copyright year for modified files 2018-06-10 22:07:21 +02:00