test: tabs to spaces, remove trailing spaces and extra empty lines at the end of files
This commit is contained in:
parent
6e4e3dfbfb
commit
3c14e4b52a
|
@ -43,4 +43,3 @@ const std::string& options::which_test() const
|
|||
{
|
||||
return _which_test;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,5 +32,3 @@ int main()
|
|||
f(a);
|
||||
possible_style();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -169,4 +169,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(Test64BitPortability)
|
||||
|
||||
|
|
|
@ -138,4 +138,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestAssignIf)
|
||||
|
||||
|
|
|
@ -667,5 +667,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestAutoVariables)
|
||||
|
||||
|
||||
|
|
|
@ -117,18 +117,18 @@ private:
|
|||
TEST_CASE(array_index_for_in_for); // FP: #2634
|
||||
TEST_CASE(array_index_calculation);
|
||||
TEST_CASE(array_index_negative1);
|
||||
TEST_CASE(array_index_negative2); // ticket #3063
|
||||
TEST_CASE(array_index_negative2); // ticket #3063
|
||||
TEST_CASE(array_index_for_decr);
|
||||
TEST_CASE(array_index_varnames); // FP: struct member. #1576
|
||||
TEST_CASE(array_index_for_break); // FP: for,break
|
||||
TEST_CASE(array_index_varnames); // FP: struct member. #1576
|
||||
TEST_CASE(array_index_for_break); // FP: for,break
|
||||
TEST_CASE(array_index_for_continue); // for,continue
|
||||
TEST_CASE(array_index_for); // FN: for,if
|
||||
TEST_CASE(array_index_for_neq); // #2211: Using != in condition
|
||||
TEST_CASE(array_index_for_question); // #2561: for, ?:
|
||||
TEST_CASE(array_index_for); // FN: for,if
|
||||
TEST_CASE(array_index_for_neq); // #2211: Using != in condition
|
||||
TEST_CASE(array_index_for_question); // #2561: for, ?:
|
||||
TEST_CASE(array_index_for_andand_oror); // FN: using && or || in the for loop condition
|
||||
TEST_CASE(array_index_vla_for); // #3221: access VLA inside for
|
||||
TEST_CASE(array_index_extern); // FP when using 'extern'. #1684
|
||||
TEST_CASE(array_index_cast); // FP after cast. #2841
|
||||
TEST_CASE(array_index_vla_for); // #3221: access VLA inside for
|
||||
TEST_CASE(array_index_extern); // FP when using 'extern'. #1684
|
||||
TEST_CASE(array_index_cast); // FP after cast. #2841
|
||||
TEST_CASE(array_index_string_literal);
|
||||
|
||||
TEST_CASE(buffer_overrun_1);
|
||||
|
@ -1401,9 +1401,9 @@ private:
|
|||
|
||||
check("int f( ) \n"
|
||||
"{\n"
|
||||
" struct {\n"
|
||||
" int arr[ 3 ];\n"
|
||||
" } var[ 1 ];\n"
|
||||
" struct {\n"
|
||||
" int arr[ 3 ];\n"
|
||||
" } var[ 1 ];\n"
|
||||
" int y;\n"
|
||||
" var[ 0 ].arr[ 0 ] = 0;\n"
|
||||
" var[ 0 ].arr[ 1 ] = 1;\n"
|
||||
|
@ -1415,9 +1415,9 @@ private:
|
|||
|
||||
check("int f( ) \n"
|
||||
"{\n"
|
||||
" struct {\n"
|
||||
" int arr[ 3 ];\n"
|
||||
" } var[ 1 ];\n"
|
||||
" struct {\n"
|
||||
" int arr[ 3 ];\n"
|
||||
" } var[ 1 ];\n"
|
||||
" int y;\n"
|
||||
" var[ 0 ].arr[ 0 ] = 0;\n"
|
||||
" var[ 0 ].arr[ 1 ] = 1;\n"
|
||||
|
|
|
@ -224,4 +224,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestCharVar)
|
||||
|
||||
|
|
|
@ -98,4 +98,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestFileLister)
|
||||
|
||||
|
|
|
@ -206,5 +206,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestIncompleteStatement)
|
||||
|
||||
|
||||
|
|
|
@ -566,4 +566,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestLeakAutoVar)
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ private:
|
|||
// -----------------
|
||||
// to double number:
|
||||
// -----------------
|
||||
ASSERT_EQUALS_DOUBLE(10.0 , MathLib::toDoubleNumber("10"));
|
||||
ASSERT_EQUALS_DOUBLE(10.0 , MathLib::toDoubleNumber("10"));
|
||||
ASSERT_EQUALS_DOUBLE(1000.0, MathLib::toDoubleNumber("10E+2"));
|
||||
ASSERT_EQUALS_DOUBLE(100.0 , MathLib::toDoubleNumber("1.0E+2"));
|
||||
ASSERT_EQUALS_DOUBLE(-100.0, MathLib::toDoubleNumber("-1.0E+2"));
|
||||
|
@ -239,18 +239,18 @@ private:
|
|||
ASSERT_EQUALS(false, MathLib::isInt("-1E-1"));
|
||||
ASSERT_EQUALS(false, MathLib::isInt("-1E-10000"));
|
||||
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0xff"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0xa"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0l"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0L"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0ul"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0ull"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0llu"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("333L"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("330L"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("330llu"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("07"));
|
||||
ASSERT_EQUALS(true, MathLib::isInt("0123"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0xff"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0xa"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0l"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0L"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0ul"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0ull"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0llu"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("333L"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("330L"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("330llu"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("07"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0123"));
|
||||
ASSERT_EQUALS(false, MathLib::isInt("0.4"));
|
||||
ASSERT_EQUALS(false, MathLib::isInt("2352.3f"));
|
||||
ASSERT_EQUALS(false, MathLib::isInt("0.00004"));
|
||||
|
@ -293,11 +293,11 @@ private:
|
|||
}
|
||||
|
||||
void isnegative() const {
|
||||
ASSERT_EQUALS(true, MathLib::isNegative("-1"));
|
||||
ASSERT_EQUALS(true, MathLib::isNegative("-1."));
|
||||
ASSERT_EQUALS(true, MathLib::isNegative("-1.0"));
|
||||
ASSERT_EQUALS(true, MathLib::isNegative("-1.0E+2"));
|
||||
ASSERT_EQUALS(true, MathLib::isNegative("-1.0E-2"));
|
||||
ASSERT_EQUALS(true , MathLib::isNegative("-1"));
|
||||
ASSERT_EQUALS(true , MathLib::isNegative("-1."));
|
||||
ASSERT_EQUALS(true , MathLib::isNegative("-1.0"));
|
||||
ASSERT_EQUALS(true , MathLib::isNegative("-1.0E+2"));
|
||||
ASSERT_EQUALS(true , MathLib::isNegative("-1.0E-2"));
|
||||
|
||||
ASSERT_EQUALS(false, MathLib::isNegative("+1"));
|
||||
ASSERT_EQUALS(false, MathLib::isNegative("+1."));
|
||||
|
@ -342,5 +342,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestMathLib)
|
||||
|
||||
|
||||
|
|
|
@ -293,5 +293,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestObsoleteFunctions)
|
||||
|
||||
|
||||
|
|
|
@ -4536,7 +4536,7 @@ private:
|
|||
"{\n"
|
||||
" if( token == \"C\")\n"
|
||||
" {\n"
|
||||
" std::cout << \"C\";\n"
|
||||
" std::cout << \"C\";\n"
|
||||
" }\n"
|
||||
" else if ( token == \"A\" )\n"
|
||||
" {\n"
|
||||
|
@ -4736,18 +4736,18 @@ private:
|
|||
"int fitInt(long long int nValue){\n"
|
||||
" if( nValue < INT32_MAX )\n"
|
||||
" {\n"
|
||||
" return 32;\n"
|
||||
" return 32;\n"
|
||||
" }\n"
|
||||
" if( nValue < INT48_MAX )\n"
|
||||
" {\n"
|
||||
" return 48;\n"
|
||||
" return 48;\n"
|
||||
" }\n"
|
||||
" else if( nValue < INT64_MAX )\n"
|
||||
" {\n"
|
||||
" return 64;\n"
|
||||
" return 64;\n"
|
||||
" } else\n"
|
||||
" {\n"
|
||||
" return -1;\n"
|
||||
" return -1;\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
@ -5651,7 +5651,7 @@ private:
|
|||
" char *p = malloc(100);\n"
|
||||
" if (x) {\n"
|
||||
" free(p);\n"
|
||||
" x = 0;\n"
|
||||
" x = 0;\n"
|
||||
" }\n"
|
||||
" free(p);\n"
|
||||
"}");
|
||||
|
@ -5789,16 +5789,16 @@ private:
|
|||
check(
|
||||
"int foo()\n"
|
||||
"{\n"
|
||||
" int* a = new int;\n"
|
||||
" bool doDelete = true;\n"
|
||||
" if (a != 0)\n"
|
||||
" {\n"
|
||||
" doDelete = false;\n"
|
||||
" delete a;\n"
|
||||
" }\n"
|
||||
" if(doDelete)\n"
|
||||
" delete a;\n"
|
||||
" return 0;\n"
|
||||
" int* a = new int;\n"
|
||||
" bool doDelete = true;\n"
|
||||
" if (a != 0)\n"
|
||||
" {\n"
|
||||
" doDelete = false;\n"
|
||||
" delete a;\n"
|
||||
" }\n"
|
||||
" if(doDelete)\n"
|
||||
" delete a;\n"
|
||||
" return 0;\n"
|
||||
"}"
|
||||
);
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
|
|
@ -348,5 +348,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestPostfixOperator)
|
||||
|
||||
|
||||
|
|
|
@ -28,4 +28,3 @@ int main(int argc, char *argv[])
|
|||
|
||||
return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ public:
|
|||
#define REGISTER_TEST( CLASSNAME ) namespace { CLASSNAME instance; }
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1409,4 +1409,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestSymbolDatabase)
|
||||
|
||||
|
|
|
@ -2481,7 +2481,7 @@ private:
|
|||
"for ( int i = 0 ; i < 10 ; ++ i ) { }\n"
|
||||
"}";
|
||||
ASSERT_EQUALS(expected, tokenizeAndStringify(code, true));
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
}
|
||||
|
||||
void simplifyKnownVariablesBailOutFor2() {
|
||||
|
@ -2494,7 +2494,7 @@ private:
|
|||
"while ( i < 10 ) { ++ i ; }\n"
|
||||
"}";
|
||||
ASSERT_EQUALS(expected, tokenizeAndStringify(code, true));
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
}
|
||||
|
||||
void simplifyKnownVariablesBailOutFor3() {
|
||||
|
@ -2507,7 +2507,7 @@ private:
|
|||
"{ }\n"
|
||||
"}";
|
||||
ASSERT_EQUALS(expected, tokenizeAndStringify(code, true));
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
ASSERT_EQUALS("", errout.str()); // debug warnings
|
||||
}
|
||||
|
||||
void simplifyKnownVariablesBailOutMemberFunction() {
|
||||
|
@ -2531,7 +2531,7 @@ private:
|
|||
" return a;\n"
|
||||
"}\n";
|
||||
tokenizeAndStringify(code,true);
|
||||
ASSERT_EQUALS("", errout.str()); // no debug warnings
|
||||
ASSERT_EQUALS("", errout.str()); // no debug warnings
|
||||
}
|
||||
|
||||
void simplifyKnownVariablesBailOutSwitchBreak() {
|
||||
|
@ -2590,17 +2590,17 @@ private:
|
|||
const char code[] = "void a(int x);" // <- x is passed by value
|
||||
"void b() {"
|
||||
" int x = 123;"
|
||||
" a(x);" // <- replace with a(123);
|
||||
" a(x);" // <- replace with a(123);
|
||||
"}";
|
||||
const char expected[] = "void a ( int x ) ; void b ( ) { a ( 123 ) ; }";
|
||||
ASSERT_EQUALS(expected, tokenizeAndStringify(code,true));
|
||||
}
|
||||
|
||||
{
|
||||
const char code[] = "void a(int &x);" // <- x is passed by reference
|
||||
const char code[] = "void a(int &x);" // <- x is passed by reference
|
||||
"void b() {"
|
||||
" int x = 123;"
|
||||
" a(x);" // <- don't replace with a(123);
|
||||
" a(x);" // <- don't replace with a(123);
|
||||
"}";
|
||||
const char expected[] = "void a ( int & x ) ; void b ( ) { int x ; x = 123 ; a ( x ) ; }";
|
||||
ASSERT_EQUALS(expected, tokenizeAndStringify(code,true));
|
||||
|
|
|
@ -2349,4 +2349,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestUninitVar)
|
||||
|
||||
|
|
|
@ -260,4 +260,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestUnusedFunctions)
|
||||
|
||||
|
|
|
@ -659,4 +659,3 @@ private:
|
|||
};
|
||||
|
||||
REGISTER_TEST(TestUnusedPrivateFunction)
|
||||
|
||||
|
|
Loading…
Reference in New Issue