From: Justin Seyster Date: Tue, 26 Oct 2010 01:28:07 +0000 (-0400) Subject: Modified inparam test case to also test param capture by type. X-Git-Tag: release-v1.0~17^2 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=4f50d9c49790606e020b6ad5dc657c2095644b3b;p=interaspect.git Modified inparam test case to also test param capture by type. --- diff --git a/test/plugin-inparam.c b/test/plugin-inparam.c index 0d83cf5..afd24f3 100644 --- a/test/plugin-inparam.c +++ b/test/plugin-inparam.c @@ -11,8 +11,9 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data) struct aop_dynval *p2; p1 = aop_capture_in_param(jp, 0); - p2 = aop_capture_in_param(jp, 1); - aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_DYNVAL(p1), AOP_DYNVAL(p2), AOP_TERM_ARG); + p2 = aop_capture_in_param_by_type(jp, 1, aop_t_all_fp()); + if (p2 != NULL) + aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_DYNVAL(p1), AOP_DYNVAL(p2), AOP_TERM_ARG); } static unsigned int plugin_int() @@ -22,7 +23,6 @@ static unsigned int plugin_int() pc = aop_match_function_entry(); aop_filter_entry_by_name(pc, "foo"); aop_filter_by_in_param(pc, 0, aop_t_all_signed()); - aop_filter_by_in_param(pc, 1, aop_t_all_fp()); aop_join_on(pc, plugin_join_on_call, "_advice_foo"); return 0;