primitive_types testcase improvement
clang compiler highlighted that array comparisons are always true
This commit is contained in:
parent
7c2ed7eae5
commit
a5a86d2cc5
1 changed files with 12 additions and 4 deletions
|
|
@ -327,10 +327,19 @@ macro(size_t, pfx, sizet)
|
|||
if (a.str() != b.str()) {
|
||||
std::cout << "failing in pfx""_""name : "
|
||||
<< a.str() << " : " << b.str() << std::endl;
|
||||
// return 0;
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
/* check variables (arrays can't be compared so compare as strings) */
|
||||
%define var_array_check(type, pfx, name)
|
||||
std::ostringstream a; std::ostringstream b;
|
||||
a << pfx##_##name;
|
||||
b << def_##name;
|
||||
if (a.str() != b.str()) {
|
||||
std::cout << "failing in pfx""_""name : "
|
||||
<< a.str() << " : " << b.str() << std::endl;
|
||||
}
|
||||
%enddef
|
||||
|
||||
/* check a function call */
|
||||
%define call_check(type, pfx, name)
|
||||
|
|
@ -342,7 +351,6 @@ macro(size_t, pfx, sizet)
|
|||
if (a.str() != b.str()) {
|
||||
std::cout << "failing in pfx""_""name : "
|
||||
<< a.str() << " : " << b.str() << std::endl;
|
||||
// return 0;
|
||||
}
|
||||
}
|
||||
%enddef
|
||||
|
|
@ -461,7 +469,7 @@ macro(size_t, pfx, sizet)
|
|||
{
|
||||
%test_prim_types_stc(var_check, stc)
|
||||
%test_prim_types(var_check, var)
|
||||
var_check(namet, var, namet);
|
||||
var_array_check(namet, var, namet);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -545,7 +553,7 @@ macro(size_t, pfx, sizet)
|
|||
{
|
||||
%test_prim_types(var_check, cct)
|
||||
%test_prim_types(var_check, var)
|
||||
var_check(namet, var, namet);
|
||||
var_array_check(namet, var, namet);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue