Skip to content

Commit 356bf92

Browse files
committed
better tests
1 parent a3f060b commit 356bf92

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

tests/stress64/t64.cpp

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18319,7 +18319,15 @@ void CheckGTSearch(const SV& sv, typename SV::value_type v,
1831918319
scanner.find_range(sv, v, v, bv_r_vv);
1832018320
scanner.find_eq(sv, v, bv_r_vv_control);
1832118321
bool eq = bv_r_vv.equal(bv_r_vv_control);
18322-
assert(eq);
18322+
if (!eq)
18323+
{
18324+
print_bv(bv_r_vv);
18325+
print_bv(bv_r_vv_control);
18326+
bv_r_vv ^= bv_r_vv_control;
18327+
cout << "diff=" << endl;
18328+
print_bv(bv_r_vv);
18329+
assert(eq);exit(1);
18330+
}
1832318331
}
1832418332

1832518333
auto it = sv.begin();
@@ -18337,9 +18345,16 @@ void CheckGTSearch(const SV& sv, typename SV::value_type v,
1833718345
bv_lt_control.set(i);
1833818346
if (v1 <= v)
1833918347
bv_le_control.set(i);
18340-
if (v1 >= 0 && v1 <= v)
18341-
bv_r_0v_control.set(i);
18342-
18348+
if (v < 0)
18349+
{
18350+
if (v1 <= 0 && v1 >= v)
18351+
bv_r_0v_control.set(i);
18352+
}
18353+
else
18354+
{
18355+
if (v1 >= 0 && v1 <= v)
18356+
bv_r_0v_control.set(i);
18357+
}
1834318358
}
1834418359
} // for
1834518360
bool eq = bv_res.equal(bv_control);
@@ -18405,6 +18420,7 @@ void CheckGTSearch(const SV& sv, typename SV::value_type v,
1840518420
}
1840618421

1840718422

18423+
1840818424
static
1840918425
void TestCompressedSparseVectorScanGT()
1841018426
{

0 commit comments

Comments
 (0)