File: IIncludeTest.h

package info (click to toggle)
eclipse-cdt 9.9.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 145,456 kB
  • sloc: java: 1,114,843; xml: 64,727; javascript: 18,756; cpp: 5,269; ansic: 3,171; makefile: 1,508; asm: 814; sh: 295; f90: 22; python: 5
file content (42 lines) | stat: -rw-r--r-- 937 bytes parent folder | download
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
// include
#include <stdio.h>
#include "whatever.h"
#include <src/slash.h>
#include <src\backslash.h>
#include "Program Files/space.h"
#include "../up1dir.h"
#include "./samedir.h"
#include "different_extension1.hpp"
#include "different_extension2.hh"
#include "different_extension3.x"
#include <no_extension>
# include "whitespace_after_hash"
	 #include "whitespace_before_hash"

// failure cases:
#include garbage
#include "resync_after_bad_parse_1"
#include
#include "resync_after_bad_parse_2"
#include "one" "two" "three"
#include "resync_after_bad_parse_3"

// from the Spec:

// from [C, 6.10.p8]
// should fail
#define EMPTY
EMPTY #include "invalid.h"

// from [C, 6.10.2.p8]:
// should equal #include "myInclude1.h"
#define MYINCFILE "myInclude1.h"
#include MYINCFILE

// from [C, 6.10.3.5.p6]:
// should equal #include "vers2.h"
#define INCFILE(x) vers ## x
#define xstr(x) str(x)
#define str(x) #x
#include xstr(INCFILE(2).h)