Clean up many strdups

This commit is contained in:
2022-11-02 20:36:07 -04:00
parent 9c1a81811c
commit 3b7bef779b
11 changed files with 39 additions and 31 deletions

View File

@@ -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);
}