File: exit.cc

package info (click to toggle)
criterion 2.3.3git1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,832 kB
  • sloc: ansic: 17,852; cpp: 795; python: 72; sh: 27; makefile: 23
file content (25 lines) | stat: -rw-r--r-- 379 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
23
24
25
#include <stdio.h>
#include <stdlib.h>
#include <criterion/criterion.h>

Test(exit, normal, .exit_code = 0) {
}

Test(exit, expected_exit, .exit_code = 42) {
    exit(42);
}

Test(exit, unexpected_exit) {
    exit(127);
}

void do_exit(void)
{
    exit(127);
}

Test(exit_with_fixtures, init_exits, .init = do_exit) {
}

Test(exit_with_fixtures, fini_exits, .fini = do_exit) {
}