History

extend test 03_struct for attr. __cleanup__

Udo committed 6 years ago

Commit a9e7fe11 parent 89b3cf02 files · +12 −3Browse files

Showing the changes to tests (2 of 2 files). Show all

Unified · Split

2 files
  1. tests/tests2/03_struct.c +10 −3
  2. tests/tests2/03_struct.expect +2 −0
tests/tests2/03_struct.c+10−3
@@ -1,6 +1,13 @@
1−#include <stdio.h>
1+extern int printf(const char*, ...);
22
3−struct fred
3+struct fred;
4+
5+void fred$(struct fred* this)
6+{
7+ printf("~fred()\n");
8+}
9+
10+struct __attribute__((__cleanup__(fred$))) fred
411 {
512 int boris;
613 int natasha;
@@ -8,7 +15,7 @@ struct fred · 1 unmodified line
815
916 int main()
1017 {
11− struct fred bloggs;
18+ struct fred __attribute__((__cleanup__(fred$))) bloggs;
1219
1320 bloggs.boris = 12;
1421 bloggs.natasha = 34;
tests/tests2/03_struct.expect+2−0
@@ -1,6 +1,8 @@
1+03_struct.c:14: warning: attribute '__cleanup__' ignored on type
12 12
23 34
34 12
45 34
56 56
67 78
8+~fred()

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t