From d6bfe97b4db7f2109a4a088ebd0898b3ef8740e9 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 14 Jun 2005 13:58:09 +0000 Subject: Tests for 98320, 99228, 99089: [generics][itds] --- tests/bugs150/pr99089/DataClass.java | 14 ++++++++++++-- tests/bugs150/pr99089/TracingAspect.java | 11 ++++++++--- 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'tests/bugs150/pr99089') diff --git a/tests/bugs150/pr99089/DataClass.java b/tests/bugs150/pr99089/DataClass.java index cbfb7905d..91e76763d 100644 --- a/tests/bugs150/pr99089/DataClass.java +++ b/tests/bugs150/pr99089/DataClass.java @@ -1,6 +1,16 @@ import java.util.Vector; public class DataClass { - private Vector v = new Vector(); - private Vector getV() { return v; } + private Vector v = new Vector(); + private Vector getV() { return v; } + + public static void main(String[]argv) { + DataClass dc = new DataClass(); + dc.v.add("hello"); + dc.doit(); + } + + public void doit() { + v.add("world"); + } } diff --git a/tests/bugs150/pr99089/TracingAspect.java b/tests/bugs150/pr99089/TracingAspect.java index ba3ef7ef6..f318797bf 100644 --- a/tests/bugs150/pr99089/TracingAspect.java +++ b/tests/bugs150/pr99089/TracingAspect.java @@ -1,7 +1,12 @@ import java.util.Vector; privileged aspect TracingAspect { - before(DataClass dc): execution(* DataClass.doit()) && this(dc) { - Vector myV = dc.getV(); - } + before(DataClass dc): execution(* DataClass.doit()) && this(dc) { + Vector myV = dc.getV(); + System.err.println("before:Length of v="+myV.size()); + } + after(DataClass dc): execution(* DataClass.doit()) && this(dc) { + Vector myV = dc.getV(); + System.err.println("after:Length of v="+myV.size()); + } } -- cgit v1.2.3