feat: apply clang-format and remove nested repo
This commit is contained in:
parent
d4d99109fa
commit
532ca2e5ee
7 changed files with 464 additions and 466 deletions
|
|
@ -101,14 +101,14 @@ dist: clean
|
|||
|
||||
style:
|
||||
@if [ -f ../materials/linters/.clang-format ]; then \
|
||||
clang-format -n $(TETRIS_SRC) $(CLI_SRC); \
|
||||
clang-format -n $(TETRIS_SRC) $(CLI_SRC) $(TEST_SRC); \
|
||||
else \
|
||||
echo ".clang-format not found"; \
|
||||
fi
|
||||
|
||||
format:
|
||||
@if [ -f ../materials/linters/.clang-format ]; then \
|
||||
clang-format -i $(TETRIS_SRC) $(CLI_SRC); \
|
||||
clang-format -i $(TETRIS_SRC) $(CLI_SRC) $(TEST_SRC); \
|
||||
else \
|
||||
echo ".clang-format not found"; \
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ START_TEST(test_i_figure_horizontal) {
|
|||
|
||||
int count = 0;
|
||||
for (int j = 0; j < 4; j++) {
|
||||
if (shape[1][j]) count++;
|
||||
if (shape[1][j])
|
||||
count++;
|
||||
}
|
||||
ck_assert_int_eq(count, 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include <check.h>
|
||||
#include "test_helper.h"
|
||||
#include <check.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -286,7 +286,6 @@ START_TEST(test_moving_to_down) {
|
|||
}
|
||||
END_TEST
|
||||
|
||||
|
||||
START_TEST(test_moving_do_nothing) {
|
||||
userInput(Start, false);
|
||||
updateCurrentState();
|
||||
|
|
@ -325,7 +324,6 @@ START_TEST(test_automatic_falling) {
|
|||
}
|
||||
END_TEST
|
||||
|
||||
|
||||
Suite *fsm_suite(void) {
|
||||
Suite *s = suite_create("FSM");
|
||||
TCase *tc = tcase_create("Core");
|
||||
|
|
@ -354,4 +352,3 @@ Suite* fsm_suite(void) {
|
|||
suite_add_tcase(s, tc);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue