Clean up many strdups
This commit is contained in:
@@ -188,20 +188,20 @@ static void test_tokenize_statement(void) {
|
||||
}
|
||||
|
||||
static void test_parse_atom_symbol(void) {
|
||||
response = ucl_parse_token_atom(ucl_symbol_create(strdup("foo")));
|
||||
response = ucl_parse_token_atom(ucl_symbol_create("foo"));
|
||||
|
||||
TEST_ASSERT_EQUAL(response->type, UCL_TYPE_SYMBOL);
|
||||
TEST_ASSERT_EQUAL_STRING(response->symbol, "foo");
|
||||
}
|
||||
|
||||
static void test_parse_atom_lparen(void) {
|
||||
response = ucl_parse_token_atom(ucl_symbol_create(strdup("(")));
|
||||
response = ucl_parse_token_atom(ucl_symbol_create("("));
|
||||
|
||||
TEST_ASSERT_NULL(response);
|
||||
}
|
||||
|
||||
static void test_parse_atom_rparen(void) {
|
||||
response = ucl_parse_token_atom(ucl_symbol_create(strdup(")")));
|
||||
response = ucl_parse_token_atom(ucl_symbol_create(")"));
|
||||
|
||||
TEST_ASSERT_NULL(response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user