Skip to content

Commit e261cde

Browse files
andrurogerzcompnerd
authored andcommitted
test cases for methods defined in the header
1 parent 8c9c685 commit e261cde

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Tests/OutOfLineInlineMethods.hh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// RUN: %idt --export-macro=IDT_TEST_ABI %s 2>&1 | %FileCheck %s
2+
3+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
4+
struct ClassWithOutOfLineMethods {
5+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
6+
ClassWithOutOfLineMethods();
7+
8+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
9+
~ClassWithOutOfLineMethods();
10+
11+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
12+
void method();
13+
14+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
15+
inline void inlineMethod();
16+
};
17+
18+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
19+
inline ClassWithOutOfLineMethods::ClassWithOutOfLineMethods() {}
20+
21+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
22+
inline ClassWithOutOfLineMethods::~ClassWithOutOfLineMethods() {}
23+
24+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
25+
void ClassWithOutOfLineMethods::method() {}
26+
27+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
28+
inline void ClassWithOutOfLineMethods::inlineMethod() {}
29+
30+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
31+
void method();
32+
33+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
34+
void method() {};
35+
36+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
37+
inline void inlineMethod();
38+
39+
// CHECK-NOT: OutOfLineInlineMethods.hh:[[@LINE+1]]:{{.*}}
40+
inline void inlineMethod() {};

0 commit comments

Comments
 (0)