From: Justin Seyster Date: Tue, 7 Sep 2010 22:25:21 +0000 (-0400) Subject: Check prototypes for struct/union/enum types testcase. X-Git-Tag: release-v1.0~48^2 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=6e2a197966b4e15ada7afb897f95b2cfd06f6008;p=interaspect.git Check prototypes for struct/union/enum types testcase. --- diff --git a/test/plugin-struct-types.c b/test/plugin-struct-types.c index 870ef68..a4f808f 100644 --- a/test/plugin-struct-types.c +++ b/test/plugin-struct-types.c @@ -42,6 +42,19 @@ static unsigned int plugin_struct() return 0; } +void aop_finish() +{ + const char *header; + header = aop_get_arg_value("header"); + + if (header != NULL) { + int res; + res = aop_write_c_header(header, "_INT_HEADER_", NULL, NULL); + if (res != 0) + perror(header); + } +} + AOP_MAIN_PROTO aop_main() { aop_register_pass("struct", plugin_struct); diff --git a/test/struct-types.xml b/test/struct-types.xml index 5d53994..549f287 100644 --- a/test/struct-types.xml +++ b/test/struct-types.xml @@ -16,5 +16,12 @@ union * advice (union_func_ptr): -1717986918, 1.100000 -- -1717986918, 1.100000 union: -1717986918, 1.100000 + + void _advice_enum(signed char *, enum baz, enum baz); + void _advice_struct(signed char *, struct foo, struct foo); + void _advice_struct_ptr(signed char *, struct foo *, struct foo *); + void _advice_union(signed char *, union bar, union bar); + void _advice_union_ptr(signed char *, union bar *, union bar *); +