ptk/test/init.c
2024-08-08 14:38:43 +02:00

16 lines
612 B
C

#include <test.h>
#include <ptk.h>
#include <stdbool.h>
TEST_START()
TEST("link to the library", {
bool init_result = ptk_init(800, 600, "test", (PtkVersion){ .major = 0, .minor = 1, .patch = 0 });
TEST_ASSERT(init_result, "ptk_init() failed");
int run_result = ptk_run(PTK_BOX(
ptk_triangle((vec2 []){{400.0f, 50.f}, {700.0f, 500.0f}, {100.0f, 500.0f}}, (vec3){0.0f, 1.0f, 0.0f}),
ptk_rect((vec2){200.0f, 200.0f}, (vec2){300.0f, 300.0f}, (vec3){1.0f, 0.0f, 0.0f}),
));
TEST_ASSERT(run_result == 0, "ptk_run() failed");
});
TEST_FINISH()