File: dumpprog.c

package info (click to toggle)
numpy 1%3A2.2.4%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 83,420 kB
  • sloc: python: 248,499; asm: 232,365; ansic: 216,874; cpp: 135,657; f90: 1,540; sh: 938; fortran: 558; makefile: 409; sed: 139; xml: 109; java: 92; perl: 79; cs: 54; javascript: 53; objc: 29; lex: 13; yacc: 9
file content (52 lines) | stat: -rw-r--r-- 1,280 bytes parent folder | download | duplicates (11)
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
48
49
50
51
52
#define SHOULD_BE_UNDEFINED 1

#include"config3.h"
#include<string.h>
#include<stdio.h>

#ifdef SHOULD_BE_UNDEFINED
#error Token did not get undefined.
#endif

#ifndef SHOULD_BE_DEFINED
#error Token did not get defined
#endif

#define stringify(s) str(s)
#define str(s) #s

int main(void) {
#if !(SHOULD_BE_UNQUOTED_STRING == string)
        printf("String token (unquoted) defined wrong.\n");
        return 1;
#endif
    if(strcmp(SHOULD_BE_STRING, "string") != 0) {
        printf("String token defined wrong.\n");
        return 1;
    }
    if(strcmp(SHOULD_BE_STRING2, "A \"B\" C") != 0) {
        printf("String token 2 defined wrong.\n");
        return 1;
    }
    if(strcmp(SHOULD_BE_STRING3, "A \"\" C") != 0) {
        printf("String token 3 defined wrong.\n");
        return 1;
    }
    if(strcmp(SHOULD_BE_STRING4, "A \" C") != 0) {
        printf("String token 4 defined wrong.\n");
        return 1;
    }
    if(SHOULD_BE_ONE != 1) {
        printf("One defined incorrectly.\n");
        return 1;
    }
    if(SHOULD_BE_ZERO != 0) {
        printf("Zero defined incorrectly.\n");
        return 1;
    }
    if(strcmp(SHOULD_BE_QUOTED_ONE, "1") != 0) {
        printf("Quoted number defined incorrectly.\n");
        return 1;
    }
    SHOULD_BE_RETURN 0;
}