lib: convert threader/container to c++
Did change the code much, but it's now compiled as c++
This commit is contained in:
@ -49,8 +49,6 @@ static bool
|
||||
call (const Command::CommandMap& cmap, const std::string& str) try
|
||||
{
|
||||
const auto sexp{Sexp::make_parse(str)};
|
||||
g_message ("invoking %s", to_string(sexp).c_str());
|
||||
|
||||
invoke (cmap, sexp);
|
||||
|
||||
return true;
|
||||
@ -75,8 +73,6 @@ test_command()
|
||||
"My command,",
|
||||
{}});
|
||||
|
||||
std::cout << "****** " << cmap << "\n";
|
||||
|
||||
g_assert_true(call(cmap, "(my-command :param1 \"hello\")"));
|
||||
g_assert_true(call(cmap, "(my-command :param1 \"hello\" :param2 123)"));
|
||||
|
||||
@ -127,6 +123,8 @@ test_command_fail()
|
||||
}
|
||||
|
||||
|
||||
static void black_hole() {}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[]) try
|
||||
{
|
||||
@ -137,6 +135,12 @@ main (int argc, char *argv[]) try
|
||||
g_test_add_func ("/utils/command-parser/command2", test_command2);
|
||||
g_test_add_func ("/utils/command-parser/command-fail", test_command_fail);
|
||||
|
||||
g_log_set_handler (NULL,
|
||||
(GLogLevelFlags)(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL|
|
||||
G_LOG_FLAG_RECURSION),
|
||||
(GLogFunc)black_hole, NULL);
|
||||
|
||||
|
||||
return g_test_run ();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user