2012-03-30 16:43:00 +02:00
|
|
|
/* See LICENSE file for license and copyright information */
|
|
|
|
|
|
|
|
#include <check.h>
|
|
|
|
|
2014-11-07 15:57:46 +01:00
|
|
|
#include "document.h"
|
2018-05-21 11:38:55 +02:00
|
|
|
#include "tests.h"
|
2012-03-30 16:43:00 +02:00
|
|
|
|
|
|
|
START_TEST(test_open) {
|
2015-12-21 18:51:30 +01:00
|
|
|
fail_unless(zathura_document_open(NULL, NULL, NULL, NULL, NULL) == NULL, "Could create document", NULL);
|
|
|
|
fail_unless(zathura_document_open(NULL, "fl", NULL, NULL, NULL) == NULL, "Could create document", NULL);
|
|
|
|
fail_unless(zathura_document_open(NULL, "fl", "ur", NULL, NULL) == NULL, "Could create document", NULL);
|
|
|
|
fail_unless(zathura_document_open(NULL, "fl", NULL, "pw", NULL) == NULL, "Could create document", NULL);
|
2012-03-30 16:43:00 +02:00
|
|
|
} END_TEST
|
|
|
|
|
2018-05-21 11:38:55 +02:00
|
|
|
static Suite* suite_document(void)
|
2012-03-30 16:43:00 +02:00
|
|
|
{
|
|
|
|
TCase* tcase = NULL;
|
|
|
|
Suite* suite = suite_create("Document");
|
|
|
|
|
|
|
|
/* basic */
|
|
|
|
tcase = tcase_create("basic");
|
|
|
|
tcase_add_test(tcase, test_open);
|
|
|
|
suite_add_tcase(suite, tcase);
|
|
|
|
|
|
|
|
return suite;
|
|
|
|
}
|
2018-05-21 11:38:55 +02:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
return run_suite(suite_document());
|
|
|
|
}
|