File: test.cc

package info (click to toggle)
cmph 2.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,748 kB
  • sloc: ansic: 10,582; cpp: 2,429; makefile: 151; sh: 111; python: 48; xml: 5
file content (22 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <cstdlib>  // For EXIT_SUCCESS, EXIT_FAILURE

#include "test.h"

Suite* global_suite() {
  static Suite* gs = suite_create("cxxmph_test_suite");
  return gs;
}
TCase* global_tc_core() {
  static TCase* gtc = tcase_create("Core");
  return gtc;
}

int main (void) {
  suite_add_tcase(global_suite(), global_tc_core());
  int number_failed;
  SRunner *sr = srunner_create (global_suite());
  srunner_run_all (sr, CK_NORMAL);
  number_failed = srunner_ntests_failed (sr);
  srunner_free (sr);
  return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}