Esempio n. 1
0
//TODO: move this check to string utils
void checkUriEquals( bool bExpectation , const std::string &s1 , const std::string &s2 , bool bCheckLeadingSlash = true )
{
  BOOST_MESSAGE( "compare uri: \"" + s1 + "\" == \"" + s2 + "\"" );
  BOOST_CHECK( bExpectation == c2s::uriEquals( s1.c_str() , s1.size() , s2.c_str() , s2.size() , bCheckLeadingSlash ) );
}
Esempio n. 2
0
void checkUriSkip( int iExpectation , const std::string &s1 , const std::string &s2 , bool bCheckLeadingSlash = true )
{
  int iSkipPoint = c2s::uriSkip( s1.c_str() , s1.size() , s2.c_str() , s2.size() , bCheckLeadingSlash );
  BOOST_MESSAGE( "skip uri: \"" + s1 + "\" == \"" + s2 + "\"" + "; result: " + c2s::util::toString( iSkipPoint ) + "; expected: " + c2s::util::toString( iExpectation ) );
  BOOST_CHECK( iExpectation == iSkipPoint );
}
Esempio n. 3
0
void done_call(done_call_args * args, size_t args_size, void * payload, size_t payload_size) 
{
  done = true;
  BOOST_MESSAGE( "received done " );
  BOOST_CHECK( payload_size == 0 || payload_size == args_size );
}