test_document.c 856 Bytes
Newer Older
1
/* SPDX-License-Identifier: Zlib */
Moritz Lipp's avatar
Moritz Lipp committed
2 3 4

#include <check.h>

5
#include "document.h"
6
#include "tests.h"
Moritz Lipp's avatar
Moritz Lipp committed
7 8

START_TEST(test_open) {
Sebastian Ramacher's avatar
Sebastian Ramacher committed
9 10 11 12
  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);
Moritz Lipp's avatar
Moritz Lipp committed
13 14
} END_TEST

15
static Suite* suite_document(void)
Moritz Lipp's avatar
Moritz Lipp committed
16 17 18 19 20 21 22 23 24 25 26
{
  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;
}
27 28 29 30 31

int main()
{
  return run_suite(suite_document());
}