File: multiple_everything.ts

package info (click to toggle)
check 0.15.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,404 kB
  • sloc: ansic: 11,759; sh: 5,258; makefile: 334
file content (47 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (8)
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
44
45
46
47
/* Multiple everything... */

#include <stdlib.h>
#include <errno.h>
#include <stdio.h>

void print_message(const char *msg, size_t msgsz)
{
    int nc;

    nc = printf("%s", msg);
    fail_unless(nc == msgsz, "failed to print completely: %s",
                strerror(errno));
}

# suite A Suite

# tcase A Test Case

# test hello_world
    const char msg[] = "Hello, world!\n";
    print_message(msg, sizeof msg - 1);

# test neverending_story
    const char msg[] = "Bastian Balthazar Bux\n";
    print_message(msg, sizeof msg - 1);

# tcase Another Test Case

# test math_problem
    fail_unless(1 + 1 == 2, "Something's broken...");

# suite Another Suite

# tcase A Test Case for Another Suite

# test more_math
    fail_unless(2/2 == 1, "Another weird math result");

# tcase A Basket Case

# test weave
    int i;
    const char msg[] = "###\n";

    for (i=0; i != 3; ++i)
        print_message(row, sizeof row - 1);