File: check_check_limit.c

package info (click to toggle)
check 0.9.8-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,724 kB
  • sloc: sh: 10,379; ansic: 5,276; makefile: 358
file content (43 lines) | stat: -rw-r--r-- 784 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
32
33
34
35
36
37
38
39
40
41
42
43
#include "../lib/libcompat.h"

#include <stdlib.h>
#include <string.h>
#include <check.h>
#include "check_check.h"
#include "check_str.h"


static SRunner *sr;

static void limit_setup (void)
{
  Suite *s = suite_create("Empty");
  sr = srunner_create(s);
  srunner_run_all(sr, CK_VERBOSE);
}

static void limit_teardown (void)
{
  srunner_free(sr);
} 

START_TEST(test_summary)
{
  fail_unless(strcmp(sr_stat_str(sr),
		     "100%: Checks: 0, Failures: 0, Errors: 0") == 0,
	      "Bad statistics string for empty suite");
}
END_TEST

Suite *make_limit_suite (void)
{
  Suite *s = suite_create("Limit");
  TCase *tc = tcase_create("Empty");

  tcase_add_test(tc,test_summary);
  tcase_add_unchecked_fixture(tc,limit_setup,limit_teardown);
  
  suite_add_tcase(s, tc);

  return s;
}