Commit 5b1d841f authored by Jonathan Hanks's avatar Jonathan Hanks

Ran clang format to reformat the code.

parent 35ab7d58
......@@ -65,7 +65,7 @@ namespace completion
std::for_each(
lower, upper, [key_size, &results]( const std::string& entry ) {
static const std::string delimiters( "-_" );
auto pos = entry.find_first_of( delimiters, key_size );
auto pos = entry.find_first_of( delimiters, key_size );
if ( pos == key_size )
{
pos = entry.find_first_of( delimiters, key_size + 1 );
......
......@@ -26,28 +26,27 @@ TEST_CASE( "Basic completion behavior" )
}
{
completion::string_list results =
completion::search( db.channels.begin( ), db.channels.end( ), "H1:SY" );
completion::string_list results = completion::search(
db.channels.begin( ), db.channels.end( ), "H1:SY" );
REQUIRE( results.size( ) == 1 );
REQUIRE( results[ 0 ] == "H1:SYS" );
}
{
completion::string_list results =
completion::search( db.channels.begin( ), db.channels.end( ), "H1:SYS" );
completion::string_list results = completion::search(
db.channels.begin( ), db.channels.end( ), "H1:SYS" );
REQUIRE( results.size( ) == 1 );
REQUIRE( results[ 0 ] == "H1:SYS-SUB" );
}
{
completion::string_list results =
completion::search( db.channels.begin( ), db.channels.end( ), "H1:SYS-SUB" );
completion::string_list results = completion::search(
db.channels.begin( ), db.channels.end( ), "H1:SYS-SUB" );
REQUIRE( results.size( ) == 3 );
REQUIRE( results[ 0 ] == "H1:SYS-SUB_A" );
REQUIRE( results[ 1 ] == "H1:SYS-SUB_B" );
REQUIRE( results[ 2 ] == "H1:SYS-SUB_C" );
}
}
TEST_CASE( "Basic DB sorting" )
......
......@@ -6,5 +6,5 @@
// http://dcc.ligo.org/M1500244/LICENSE.txt
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this
// in one cpp file
// in one cpp file
#include "catch.hpp"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment