Skip to content

Commit e62f99a

Browse files
author
Heitor Danilo
committed
chore: rename tests
1 parent 7eaec5e commit e62f99a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/ast/ast_test.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void test_statement(char* want, char* got, char* test_name) {
2525
printf("\x1b[36m%s:\x1b[0m \x1b[32mPass.\x1b[0m\n", test_name);
2626
}
2727

28-
void test_should_pass_if_program_to_string_is_equal_than_input() {
28+
void test_should_pass_if_program_to_string_is_equal_to_expected() {
2929
char* input = "var x = ;\n" // var statement
3030
"var mut y = ;\n" // mutable var statement
3131
"return ;"; // return statement
@@ -37,10 +37,10 @@ void test_should_pass_if_program_to_string_is_equal_than_input() {
3737
"return ;";
3838
char* got = prg->to_string(prg);
3939

40-
test_statement(want, got, "test_should_pass_if_program_to_string_is_equal_than_input");
40+
test_statement(want, got, "test_should_pass_if_program_to_string_is_equal_to_expected");
4141
}
4242

43-
void test_should_pass_if_return_statement_to_string_is_equal_than_input() {
43+
void test_should_pass_if_return_statement_to_string_is_equal_to_expected() {
4444
char* input = "return ;";
4545
struct Program* prg = create_program(input);
4646

@@ -49,10 +49,10 @@ void test_should_pass_if_return_statement_to_string_is_equal_than_input() {
4949
char* want = "return ;\n";
5050
char* got = prg->statements[0]->to_string(prg->statements[0]);
5151

52-
test_statement(want, got, "test_should_pass_if_return_statement_to_string_is_equal_than_input");
52+
test_statement(want, got, "test_should_pass_if_return_statement_to_string_is_equal_to_expected");
5353
}
5454

55-
void test_should_pass_if_var_statement_to_string_is_equal_than_input() {
55+
void test_should_pass_if_var_statement_to_string_is_equal_to_expected() {
5656
char* input = "var x = ;";
5757
struct Program* prg = create_program(input);
5858

@@ -61,10 +61,10 @@ void test_should_pass_if_var_statement_to_string_is_equal_than_input() {
6161
char* want = "var x = ;\n";
6262
char* got = prg->statements[0]->to_string(prg->statements[0]);
6363

64-
test_statement(want, got, "test_should_pass_if_var_statement_to_string_is_equal_than_input");
64+
test_statement(want, got, "test_should_pass_if_var_statement_to_string_is_equal_to_expected");
6565
}
6666

67-
void test_should_pass_if_mutable_var_statement_to_string_is_equal_than_input() {
67+
void test_should_pass_if_mutable_var_statement_to_string_is_equal_to_expected() {
6868
char* input = "var mut x = ;";
6969
struct Program* prg = create_program(input);
7070

@@ -73,5 +73,5 @@ void test_should_pass_if_mutable_var_statement_to_string_is_equal_than_input() {
7373
char* want = "var mut x = ;\n";
7474
char* got = prg->statements[0]->to_string(prg->statements[0]);
7575

76-
test_statement(want, got, "test_should_pass_if_mutable_var_statement_to_string_is_equal_than_input");
76+
test_statement(want, got, "test_should_pass_if_mutable_var_statement_to_string_is_equal_to_expected");
7777
}

src/ast/ast_test.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#include <lexer/lib.h>
55
#include <ast/def.h>
66

7-
void test_should_pass_if_program_to_string_is_equal_than_input();
7+
void test_should_pass_if_program_to_string_is_equal_to_expected();
88

9-
void test_should_pass_if_return_statement_to_string_is_equal_than_input();
10-
void test_should_pass_if_mutable_var_statement_to_string_is_equal_than_input();
11-
void test_should_pass_if_var_statement_to_string_is_equal_than_input();
9+
void test_should_pass_if_return_statement_to_string_is_equal_to_expected();
10+
void test_should_pass_if_mutable_var_statement_to_string_is_equal_to_expected();
11+
void test_should_pass_if_var_statement_to_string_is_equal_to_expected();
1212

1313
#endif /* AST_TEST_H */

0 commit comments

Comments
 (0)