Commit 0a0c712e authored by Moritz Lipp's avatar Moritz Lipp

Added basic session test

parent c9de38d9
......@@ -33,4 +33,3 @@ int main(int argc, char* argv[])
return 0;
}
/* See LICENSE file for license and copyright information */
#include <check.h>
#include "../zathura.h"
START_TEST(test_create) {
zathura_t* zathura = zathura_init(0, NULL);
fail_unless(zathura != NULL, "Could not create session");
zathura_free(zathura);
} END_TEST
Suite* suite_session()
{
TCase* tcase = NULL;
Suite* suite = suite_create("Session");
/* basic */
tcase = tcase_create("basic");
tcase_add_test(tcase, test_create);
suite_add_tcase(suite, tcase);
return suite;
}
......@@ -3,14 +3,26 @@
#include <check.h>
#include <stdlib.h>
Suite* suite_session();
Suite* suite_utils();
int main()
int
main(int argc, char* argv[])
{
Suite* suite = NULL;
SRunner* suite_runner = NULL;
int number_failed = 0;
/* init gtk */
gtk_init(&argc, &argv);
/* test session */
suite = suite_session();
suite_runner = srunner_create(suite);
srunner_run_all(suite_runner, CK_NORMAL);
number_failed += srunner_ntests_failed(suite_runner);
srunner_free(suite_runner);
/* test utils */
suite = suite_utils();
suite_runner = srunner_create(suite);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment