tests: updated the tests
This commit is contained in:
parent
c2b76372b9
commit
3708fde176
11
tests.cpp
11
tests.cpp
|
@ -27,7 +27,7 @@ static void operator_eq();
|
||||||
static void memleak_in_function();
|
static void memleak_in_function();
|
||||||
static void memleak_in_class();
|
static void memleak_in_class();
|
||||||
static void division();
|
static void division();
|
||||||
static void unused_variable();
|
static void variable_scope();
|
||||||
static void fpar_byvalue();
|
static void fpar_byvalue();
|
||||||
static void unused_struct_member();
|
static void unused_struct_member();
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@ -58,14 +58,16 @@ int main()
|
||||||
// Check for dangerous division.. such as "svar / uvar". Treating "svar" as unsigned data is not good
|
// Check for dangerous division.. such as "svar / uvar". Treating "svar" as unsigned data is not good
|
||||||
division();
|
division();
|
||||||
|
|
||||||
// unused variable..
|
// variable scope..
|
||||||
unused_variable();
|
variable_scope();
|
||||||
|
|
||||||
fpar_byvalue();
|
fpar_byvalue();
|
||||||
|
|
||||||
// unused struct member..
|
// unused struct member..
|
||||||
unused_struct_member();
|
unused_struct_member();
|
||||||
|
|
||||||
|
// unused variable
|
||||||
|
|
||||||
std::cout << "Success Rate: "
|
std::cout << "Success Rate: "
|
||||||
<< SuccessCount
|
<< SuccessCount
|
||||||
<< " / "
|
<< " / "
|
||||||
|
@ -805,7 +807,7 @@ static void division()
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static void unused_variable()
|
static void variable_scope()
|
||||||
{
|
{
|
||||||
/* TODO
|
/* TODO
|
||||||
// Unused private member variable...
|
// Unused private member variable...
|
||||||
|
@ -999,6 +1001,7 @@ static void unused_struct_member()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue