Increase the test coverage

This commit is contained in:
Gennaro Prota
2025-09-26 16:51:47 +02:00
parent 809b7a3796
commit 982073fbcd
2 changed files with 16 additions and 0 deletions

View File

@@ -208,6 +208,13 @@ run_test_cases()
}
//=====================================================================
// Test b.set(pos, len)
// case size is 0
{
bitset_type b( std::string( "10" ) ) ;
Tests::set_segment( b, 0, 0, true );
Tests::set_segment( b, 0, 0, false );
}
{ // case size is 1
bitset_type b( std::string( "0" ) );
Tests::set_segment( b, 0, 1, true );

View File

@@ -480,6 +480,11 @@ run_test_cases()
bitset_type a, b;
Tests::operator_less_than( a, b );
}
{
bitset_type a;
bitset_type b( std::string( "1" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "0" ) ), b( std::string( "0" ) );
Tests::operator_less_than( a, b );
@@ -500,6 +505,10 @@ run_test_cases()
bitset_type a( std::string( "10" ) ), b( std::string( "111" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( std::string( "11" ) ), b( std::string( "111" ) );
Tests::operator_less_than( a, b );
}
{
bitset_type a( long_string ), b( long_string );
Tests::operator_less_than( a, b );