File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
# char* x()
4
+ echo " In: x () * char"
5
+ echo " Expected: char* x()"
6
+ printf " Actual: "
4
7
echo " x () * char" | ./bin/undecl | grep " char\* x()"
8
+ printf " \n"
5
9
6
10
# char x[]
11
+ echo " In: x [] char"
12
+ echo " Expected: char x[]"
13
+ printf " Actual: "
7
14
echo " x [] char" | ./bin/undecl | grep " char x\[\]"
15
+ printf " \n"
8
16
9
17
# char (*x)()
10
18
# declare x as pointer to function returning char
19
+ echo " In: x * () char"
20
+ echo " Expected: char (*x)()"
21
+ printf " Actual: "
11
22
echo " x * () char" | ./bin/undecl | grep " char (\*x)()"
23
+ printf " \n"
12
24
13
25
# char (*(*x())[])()
14
26
# declare x as function returning pointer to array of pointer to function returning char
27
+ echo " In: x () * [] * () char"
28
+ echo " Expected: char (*(*x())[])()"
29
+ printf " Actual: "
15
30
echo " x () * [] * () char" | ./bin/undecl | grep " char (\*(\*x())\[\])()"
31
+ printf " \n"
16
32
17
33
# char** (*x)()
18
34
# declare x as pointer to function returning pointer to pointer to char
35
+ echo " In: x * () * * char"
36
+ echo " Expected: char **(*x)()"
37
+ printf " Actual: "
19
38
echo " x * () * * char" | ./bin/undecl | grep " char \*\*(\*x)()"
39
+ printf " \n"
You can’t perform that action at this time.
0 commit comments