From 32ed1528933aac1798b285b5af22de502fccc496 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 1 Nov 2005 16:59:40 +0000 Subject: [PATCH] pr105479: reorganized testcases. --- .../bugs150/pr105479/{ => case1}/Driver.java | 0 .../pr105479/{ => case1}/ReturnTypeTest.aj | 0 .../{ => case1}/ReturnTypeTester.java | 0 .../pr105479/case2/ReturnTypeTest.java | 12 ++++++++++ .../pr105479/case2/ReturnTypeTester.java | 23 +++++++++++++++++++ 5 files changed, 35 insertions(+) rename tests/bugs150/pr105479/{ => case1}/Driver.java (100%) rename tests/bugs150/pr105479/{ => case1}/ReturnTypeTest.aj (100%) rename tests/bugs150/pr105479/{ => case1}/ReturnTypeTester.java (100%) create mode 100644 tests/bugs150/pr105479/case2/ReturnTypeTest.java create mode 100644 tests/bugs150/pr105479/case2/ReturnTypeTester.java diff --git a/tests/bugs150/pr105479/Driver.java b/tests/bugs150/pr105479/case1/Driver.java similarity index 100% rename from tests/bugs150/pr105479/Driver.java rename to tests/bugs150/pr105479/case1/Driver.java diff --git a/tests/bugs150/pr105479/ReturnTypeTest.aj b/tests/bugs150/pr105479/case1/ReturnTypeTest.aj similarity index 100% rename from tests/bugs150/pr105479/ReturnTypeTest.aj rename to tests/bugs150/pr105479/case1/ReturnTypeTest.aj diff --git a/tests/bugs150/pr105479/ReturnTypeTester.java b/tests/bugs150/pr105479/case1/ReturnTypeTester.java similarity index 100% rename from tests/bugs150/pr105479/ReturnTypeTester.java rename to tests/bugs150/pr105479/case1/ReturnTypeTester.java diff --git a/tests/bugs150/pr105479/case2/ReturnTypeTest.java b/tests/bugs150/pr105479/case2/ReturnTypeTest.java new file mode 100644 index 000000000..113f3a602 --- /dev/null +++ b/tests/bugs150/pr105479/case2/ReturnTypeTest.java @@ -0,0 +1,12 @@ +public aspect ReturnTypeTest { + private interface Test { + Object getId(); + int hashCode(); + } + + public int Test.hashCode() { + return getId().hashCode(); + } + + declare parents : ReturnTypeTester implements Test; +} diff --git a/tests/bugs150/pr105479/case2/ReturnTypeTester.java b/tests/bugs150/pr105479/case2/ReturnTypeTester.java new file mode 100644 index 000000000..bdd9612d9 --- /dev/null +++ b/tests/bugs150/pr105479/case2/ReturnTypeTester.java @@ -0,0 +1,23 @@ +import java.util.HashSet; +import java.util.Set; + +public class ReturnTypeTester { + static Set set = new HashSet(); + static { + ReturnTypeTester tester = new ReturnTypeTester(); + set.add(tester); + } + + public String getId() { + return "id"; + } + + public static void main(String []argv) { + ReturnTypeTester rtt = new ReturnTypeTester(); + System.err.println("xxx"); + rtt.hashCode(); + System.err.println("yyy"); + rtt.getId(); + System.err.println("zzz"); + } +} -- 2.39.5