File tree Expand file tree Collapse file tree
tests/0026.container/0014.bitvec Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,7 +539,7 @@ inline void test_bitvec_bitops()
539539 ::fast_io::bitvec c = a & b;
540540 for (::std::size_t i{}; i != 256u ; ++i)
541541 {
542- bool expected = ((i & 1u ) != 0u ) && ((i & 3u ) == 2u );
542+ bool expected = a. test (i) && b. test (i );
543543 if (c.test (i) != expected)
544544 {
545545 ::fast_io::io::panicln (" ERROR: operator& mismatch at index " , i);
@@ -550,7 +550,7 @@ inline void test_bitvec_bitops()
550550 ::fast_io::bitvec d = a | b;
551551 for (::std::size_t i{}; i != 256u ; ++i)
552552 {
553- bool expected = a.test (i) && b.test (i);
553+ bool expected = a.test (i) || b.test (i);
554554 if (d.test (i) != expected)
555555 {
556556 ::fast_io::io::panicln (" ERROR: operator| mismatch at index " , i);
@@ -561,7 +561,7 @@ inline void test_bitvec_bitops()
561561 ::fast_io::bitvec e = a ^ b;
562562 for (::std::size_t i{}; i != 256u ; ++i)
563563 {
564- bool expected = ((i & 1u ) != 0u ) ^ ((i & 3u ) == 2u );
564+ bool expected = a. test (i) ^ b. test (i );
565565 if (e.test (i) != expected)
566566 {
567567 ::fast_io::io::panicln (" ERROR: operator^ mismatch at index " , i);
You can’t perform that action at this time.
0 commit comments