Skip to content

Commit 982073f

Browse files
committed
Increase the test coverage
1 parent 809b7a3 commit 982073f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/dyn_bitset_unit_tests2.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,13 @@ run_test_cases()
208208
}
209209
//=====================================================================
210210
// Test b.set(pos, len)
211+
212+
// case size is 0
213+
{
214+
bitset_type b( std::string( "10" ) ) ;
215+
Tests::set_segment( b, 0, 0, true );
216+
Tests::set_segment( b, 0, 0, false );
217+
}
211218
{ // case size is 1
212219
bitset_type b( std::string( "0" ) );
213220
Tests::set_segment( b, 0, 1, true );

test/dyn_bitset_unit_tests3.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,11 @@ run_test_cases()
480480
bitset_type a, b;
481481
Tests::operator_less_than( a, b );
482482
}
483+
{
484+
bitset_type a;
485+
bitset_type b( std::string( "1" ) );
486+
Tests::operator_less_than( a, b );
487+
}
483488
{
484489
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
485490
Tests::operator_less_than( a, b );
@@ -500,6 +505,10 @@ run_test_cases()
500505
bitset_type a( std::string( "10" ) ), b( std::string( "111" ) );
501506
Tests::operator_less_than( a, b );
502507
}
508+
{
509+
bitset_type a( std::string( "11" ) ), b( std::string( "111" ) );
510+
Tests::operator_less_than( a, b );
511+
}
503512
{
504513
bitset_type a( long_string ), b( long_string );
505514
Tests::operator_less_than( a, b );

0 commit comments

Comments
 (0)