File: test_document.c

package info (click to toggle)
zathura 0.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,616 kB
  • sloc: ansic: 13,668; python: 49; xml: 48; perl: 41; makefile: 8
file content (31 lines) | stat: -rw-r--r-- 856 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* SPDX-License-Identifier: Zlib */

#include <check.h>

#include "document.h"
#include "tests.h"

START_TEST(test_open) {
  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);
} END_TEST

static Suite* suite_document(void)
{
  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;
}

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