Browse Source

externalize zhe initializer_list<> to get better compiler error messages. might be reverted sometimes later.

master
roker 12 months ago
parent
commit
999052db8b
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      test/unittest_stringpair.cc

+ 3
- 2
test/unittest_stringpair.cc View File

@ -18,7 +18,8 @@ TEST( StringPair, Simple )
TEST( StringPair, InitList )
{
pEp::StringPairList spl( { SP{"key0", "value0"}, SP{"key1", "value1"} } );
const std::initializer_list<pEp::StringPair> il{ SP{"key0", "value0"}, SP{"key1", "value1"} };
pEp::StringPairList spl( il );
EXPECT_EQ( spl.size(), 2);
spl.clear();
@ -46,7 +47,7 @@ TEST( StringPair, Dynamic )
spl.push_back( pEp::StringPair{key, value}.move_out() );
}
auto find_by_key = [key](const pEp::StringPair& sp){ return strcmp(sp.get()->key, key)==0; };
auto find_by_key = [key](const ::stringpair_t* sp){ return strcmp(sp->key, key)==0; };
// delete random elements.
for(unsigned u=0; u<NumberOfElements; ++u)


Loading…
Cancel
Save