Skip to content

Commit 9334dec

Browse files
authored
Add tests for polygon (#128)
1 parent ddafffe commit 9334dec

3 files changed

Lines changed: 615 additions & 5 deletions

File tree

tests/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ SRCS = \
1717
../src/hagl_triangle.c \
1818
../src/rgb565.c
1919

20-
all: test_fill_polygon
20+
all: test_fill_polygon test_polygon
2121

2222
test_fill_polygon: test_fill_polygon.c $(SRCS)
2323
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
2424

25-
test: test_fill_polygon
25+
test_polygon: test_polygon.c $(SRCS)
26+
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
27+
28+
test: test_fill_polygon test_polygon
2629
./test_fill_polygon
30+
./test_polygon
2731

2832
clean:
29-
rm -f test_fill_polygon
33+
rm -f test_fill_polygon test_polygon
3034

3135
.PHONY: all test clean

tests/test_fill_polygon.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ test_fill_polygon_degenerate_two_vertices(void) {
561561
PASS();
562562
}
563563

564-
SUITE(polygon_suite) {
564+
SUITE(fill_polygon_suite) {
565565
SET_SETUP(setup_callback, NULL);
566566
RUN_TEST(test_fill_polygon_square);
567567
RUN_TEST(test_fill_polygon_square_regression);
@@ -592,6 +592,6 @@ GREATEST_MAIN_DEFS();
592592
int
593593
main(int argc, char **argv) {
594594
GREATEST_MAIN_BEGIN();
595-
RUN_SUITE(polygon_suite);
595+
RUN_SUITE(fill_polygon_suite);
596596
GREATEST_MAIN_END();
597597
}

0 commit comments

Comments
 (0)