From 611164c967be7d02c56a014a4ef2e79f9b52f16a Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 9 Dec 2004 18:58:06 +0000 Subject: [PATCH] Autoboxing testdata - all primitives covered. --- tests/java5/autoboxing/AspectBoolean.aj | 11 +++++++++++ tests/java5/autoboxing/AspectByte.aj | 11 +++++++++++ tests/java5/autoboxing/AspectChar.aj | 11 +++++++++++ tests/java5/autoboxing/AspectDouble.aj | 11 +++++++++++ tests/java5/autoboxing/AspectFloat.aj | 11 +++++++++++ tests/java5/autoboxing/AspectInteger.aj | 11 +++++++++++ tests/java5/autoboxing/AspectLong.aj | 11 +++++++++++ tests/java5/autoboxing/AspectShort.aj | 11 +++++++++++ tests/java5/autoboxing/AutoboxingB.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingC.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingD.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingF.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingI.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingJ.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingS.java | 16 ++++++++++++++++ tests/java5/autoboxing/AutoboxingZ.java | 14 ++++++++++++++ tests/java5/autoboxing/SimpleAutoboxing.java | 9 +++++++++ .../java5/autoboxing/SimpleAutoboxingAspect.aj | 11 +++++++++++ tests/java5/autoboxing/build.xml | 11 +++++++++++ tests/java5/autoboxing/testcode.jar | Bin 0 -> 7244 bytes 20 files changed, 245 insertions(+) create mode 100644 tests/java5/autoboxing/AspectBoolean.aj create mode 100644 tests/java5/autoboxing/AspectByte.aj create mode 100644 tests/java5/autoboxing/AspectChar.aj create mode 100644 tests/java5/autoboxing/AspectDouble.aj create mode 100644 tests/java5/autoboxing/AspectFloat.aj create mode 100644 tests/java5/autoboxing/AspectInteger.aj create mode 100644 tests/java5/autoboxing/AspectLong.aj create mode 100644 tests/java5/autoboxing/AspectShort.aj create mode 100644 tests/java5/autoboxing/AutoboxingB.java create mode 100644 tests/java5/autoboxing/AutoboxingC.java create mode 100644 tests/java5/autoboxing/AutoboxingD.java create mode 100644 tests/java5/autoboxing/AutoboxingF.java create mode 100644 tests/java5/autoboxing/AutoboxingI.java create mode 100644 tests/java5/autoboxing/AutoboxingJ.java create mode 100644 tests/java5/autoboxing/AutoboxingS.java create mode 100644 tests/java5/autoboxing/AutoboxingZ.java create mode 100644 tests/java5/autoboxing/SimpleAutoboxing.java create mode 100644 tests/java5/autoboxing/SimpleAutoboxingAspect.aj create mode 100644 tests/java5/autoboxing/build.xml create mode 100644 tests/java5/autoboxing/testcode.jar diff --git a/tests/java5/autoboxing/AspectBoolean.aj b/tests/java5/autoboxing/AspectBoolean.aj new file mode 100644 index 000000000..8b980d567 --- /dev/null +++ b/tests/java5/autoboxing/AspectBoolean.aj @@ -0,0 +1,11 @@ +public aspect AspectBoolean { + + // The pointcuts here expose context + before(Boolean i): within(AutoboxingZ) && call(* met*(..)) && args(i) { + System.err.println("Boolean:"+i); + } + + before(boolean i): within(AutoboxingZ) && call(* met*(..)) && args(i) { + System.err.println("boolean:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectByte.aj b/tests/java5/autoboxing/AspectByte.aj new file mode 100644 index 000000000..e60412385 --- /dev/null +++ b/tests/java5/autoboxing/AspectByte.aj @@ -0,0 +1,11 @@ +public aspect AspectByte { + + // The pointcuts here expose context + before(Byte i): within(AutoboxingB) && call(* met*(..)) && args(i) { + System.err.println("Byte:"+i); + } + + before(byte i): within(AutoboxingB) && call(* met*(..)) && args(i) { + System.err.println("byte:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectChar.aj b/tests/java5/autoboxing/AspectChar.aj new file mode 100644 index 000000000..dc185a03b --- /dev/null +++ b/tests/java5/autoboxing/AspectChar.aj @@ -0,0 +1,11 @@ +public aspect AspectChar { + + // The pointcuts here expose context + before(Character i): within(AutoboxingC) && call(* met*(..)) && args(i) { + System.err.println("Character:"+i); + } + + before(char i): within(AutoboxingC) && call(* met*(..)) && args(i) { + System.err.println("char:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectDouble.aj b/tests/java5/autoboxing/AspectDouble.aj new file mode 100644 index 000000000..cef86f03a --- /dev/null +++ b/tests/java5/autoboxing/AspectDouble.aj @@ -0,0 +1,11 @@ +public aspect AspectDouble { + + // The pointcuts here expose context + before(Double i): within(AutoboxingD) && call(* met*(..)) && args(i) { + System.err.println("Double:"+i); + } + + before(double i): within(AutoboxingD) && call(* met*(..)) && args(i) { + System.err.println("double:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectFloat.aj b/tests/java5/autoboxing/AspectFloat.aj new file mode 100644 index 000000000..b2351b378 --- /dev/null +++ b/tests/java5/autoboxing/AspectFloat.aj @@ -0,0 +1,11 @@ +public aspect AspectFloat { + + // The pointcuts here expose context + before(Float i): within(AutoboxingF) && call(* met*(..)) && args(i) { + System.err.println("Float:"+i); + } + + before(float i): within(AutoboxingF) && call(* met*(..)) && args(i) { + System.err.println("float:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectInteger.aj b/tests/java5/autoboxing/AspectInteger.aj new file mode 100644 index 000000000..4fb7e815f --- /dev/null +++ b/tests/java5/autoboxing/AspectInteger.aj @@ -0,0 +1,11 @@ +public aspect AspectInteger { + + // The pointcuts here expose context + before(Integer i): within(AutoboxingI) && call(* met*(..)) && args(i) { + System.err.println("Matching by Integer:"+i); + } + + before(int i): within(AutoboxingI) && call(* met*(..)) && args(i) { + System.err.println("Matching by int:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectLong.aj b/tests/java5/autoboxing/AspectLong.aj new file mode 100644 index 000000000..4b3f896bc --- /dev/null +++ b/tests/java5/autoboxing/AspectLong.aj @@ -0,0 +1,11 @@ +public aspect AspectLong { + + // The pointcuts here expose context + before(Long i): within(AutoboxingJ) && call(* met*(..)) && args(i) { + System.err.println("Long:"+i); + } + + before(long i): within(AutoboxingJ) && call(* met*(..)) && args(i) { + System.err.println("long:"+i); + } +} diff --git a/tests/java5/autoboxing/AspectShort.aj b/tests/java5/autoboxing/AspectShort.aj new file mode 100644 index 000000000..f6ee9d045 --- /dev/null +++ b/tests/java5/autoboxing/AspectShort.aj @@ -0,0 +1,11 @@ +public aspect AspectShort { + + // The pointcuts here expose context + before(Short i): within(AutoboxingS) && call(* met*(..)) && args(i) { + System.err.println("Short:"+i); + } + + before(short i): within(AutoboxingS) && call(* met*(..)) && args(i) { + System.err.println("short:"+i); + } +} diff --git a/tests/java5/autoboxing/AutoboxingB.java b/tests/java5/autoboxing/AutoboxingB.java new file mode 100644 index 000000000..2830c1deb --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingB.java @@ -0,0 +1,16 @@ +public class AutoboxingB { + + public static void method_takes_Byte(Byte i) { System.err.println("method_takes_Byte="+i);} + public static void method_takes_byte(byte i) { System.err.println("method_takes_byte="+i);} + + public static void main(String[] argv) { + Byte one = new Byte("1"); + byte two = '2'; + Byte three = new Byte("3"); + byte four = '4' ; + method_takes_Byte(one); + method_takes_Byte(two); + method_takes_byte(three); + method_takes_byte(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingC.java b/tests/java5/autoboxing/AutoboxingC.java new file mode 100644 index 000000000..fdf16a9df --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingC.java @@ -0,0 +1,16 @@ +public class AutoboxingC { + + public static void method_takes_Character(Character i) { System.err.println("method_takes_Character="+i);} + public static void method_takes_char(char i) { System.err.println("method_takes_char="+i);} + + public static void main(String[] argv) { + Character one = new Character('1'); + char two = '2'; + Character three = new Character('3'); + char four = '4'; + method_takes_Character(one); + method_takes_Character(two); + method_takes_char(three); + method_takes_char(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingD.java b/tests/java5/autoboxing/AutoboxingD.java new file mode 100644 index 000000000..242171b46 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingD.java @@ -0,0 +1,16 @@ +public class AutoboxingD { + + public static void method_takes_Double(Double i) { System.err.println("method_takes_Double="+i);} + public static void method_takes_double(double i) { System.err.println("method_takes_double="+i);} + + public static void main(String[] argv) { + Double one = new Double(100.0f); + double two = 200.0f; + Double three = new Double(300.0f); + double four = 400.0f; + method_takes_Double(one); + method_takes_Double(two); + method_takes_double(three); + method_takes_double(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingF.java b/tests/java5/autoboxing/AutoboxingF.java new file mode 100644 index 000000000..ee7a1e664 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingF.java @@ -0,0 +1,16 @@ +public class AutoboxingF { + + public static void method_takes_Float(Float i) { System.err.println("method_takes_Float="+i);} + public static void method_takes_float(float i) { System.err.println("method_takes_float="+i);} + + public static void main(String[] argv) { + Float one = new Float(100.0f); + float two = 200.0f; + Float three = new Float(300.0f); + float four = 400.0f; + method_takes_Float(one); + method_takes_Float(two); + method_takes_float(three); + method_takes_float(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingI.java b/tests/java5/autoboxing/AutoboxingI.java new file mode 100644 index 000000000..102d6e903 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingI.java @@ -0,0 +1,16 @@ +public class AutoboxingI { + + public static void method_takes_Integer(Integer i) { System.err.println("method_takes_Integer="+i);} + public static void method_takes_int(int i) { System.err.println("method_takes_int="+i);} + + public static void main(String[] argv) { + Integer one = new Integer(10000); + int two = 20000; + Integer three = new Integer(30000); + int four = 40000; + method_takes_Integer(one); + method_takes_Integer(two); + method_takes_int(three); + method_takes_int(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingJ.java b/tests/java5/autoboxing/AutoboxingJ.java new file mode 100644 index 000000000..6332b6806 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingJ.java @@ -0,0 +1,16 @@ +public class AutoboxingJ { + + public static void method_takes_Long(Long i) { System.err.println("method_takes_Long="+i);} + public static void method_takes_long(long i) { System.err.println("method_takes_long="+i);} + + public static void main(String[] argv) { + Long one = new Long(1000000); + long two = 2000000; + Long three = new Long(3000000); + long four = 4000000; + method_takes_Long(one); + method_takes_Long(two); + method_takes_long(three); + method_takes_long(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingS.java b/tests/java5/autoboxing/AutoboxingS.java new file mode 100644 index 000000000..0fe514554 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingS.java @@ -0,0 +1,16 @@ +public class AutoboxingS { + + public static void method_takes_Short(Short i) { System.err.println("method_takes_Short="+i);} + public static void method_takes_short(short i) { System.err.println("method_takes_short="+i);} + + public static void main(String[] argv) { + Short one = new Short("100"); + short two = 200; + Short three = new Short("300"); + short four = 400; + method_takes_Short(one); + method_takes_Short(two); + method_takes_short(three); + method_takes_short(four); + } +} diff --git a/tests/java5/autoboxing/AutoboxingZ.java b/tests/java5/autoboxing/AutoboxingZ.java new file mode 100644 index 000000000..b88112d80 --- /dev/null +++ b/tests/java5/autoboxing/AutoboxingZ.java @@ -0,0 +1,14 @@ +public class AutoboxingZ { + + public static void method_takes_Boolean(Boolean b) { System.err.println("method_takes_Boolean="+b);} + public static void method_takes_boolean(boolean b) { System.err.println("method_takes_boolean="+b);} + + public static void main(String[] argv) { + Boolean t = new Boolean(false); + boolean f = false; + method_takes_Boolean(t); + method_takes_Boolean(f); + method_takes_boolean(t); + method_takes_boolean(f); + } +} diff --git a/tests/java5/autoboxing/SimpleAutoboxing.java b/tests/java5/autoboxing/SimpleAutoboxing.java new file mode 100644 index 000000000..df2e9e68f --- /dev/null +++ b/tests/java5/autoboxing/SimpleAutoboxing.java @@ -0,0 +1,9 @@ +public class SimpleAutoboxing { + + public static void method_takes_Integer(Integer i) { System.err.println("method_takes_Integer="+i);} + + public static void main(String[] argv) { + int one = 20000; + method_takes_Integer(one); + } +} diff --git a/tests/java5/autoboxing/SimpleAutoboxingAspect.aj b/tests/java5/autoboxing/SimpleAutoboxingAspect.aj new file mode 100644 index 000000000..b13d3c253 --- /dev/null +++ b/tests/java5/autoboxing/SimpleAutoboxingAspect.aj @@ -0,0 +1,11 @@ +public aspect SimpleAutoboxingAspect { + + // The pointcuts here expose context + before(Integer i): within(SimpleAutoboxing) && call(* met*(..)) && args(i) { + System.err.println("Matching by Integer:"+i); + } + + before(int i): within(SimpleAutoboxing) && call(* met*(..)) && args(i) { + System.err.println("Matching by int:"+i); + } +} diff --git a/tests/java5/autoboxing/build.xml b/tests/java5/autoboxing/build.xml new file mode 100644 index 000000000..d38a7705f --- /dev/null +++ b/tests/java5/autoboxing/build.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tests/java5/autoboxing/testcode.jar b/tests/java5/autoboxing/testcode.jar new file mode 100644 index 0000000000000000000000000000000000000000..a758f7b0f7bef6ddc2fc0c57370be094ba199007 GIT binary patch literal 7244 zcmb7}cT`jRx9us?BfW(py`$1Wq=y=+^d>FzF3o@nNC`KmO&H%M~Ex>Swz_|_rtx-v$PBv&%z^S>;C7+m|h4Tnv0x>FPsMpyK2l22kQR!3- zs+7rWF2IrjY40`0JrZacxsx0dX!yH_c$96va~SE8kY)Bl?TlD+J<#H{cqcFT89kba$e3rKfyNa~f6>COAfkYH2ADbkRN>;Cpd)e#qJbXpuf}l!y}2tJ3x&b&yCHNEy?X5E;sbg({Fi zRD})A6ejXl+F^E`$;O%~8WlGxEX^DGsI8m5M{Hb4nISI$$W8hyp!-ve7}t_)x?QbY z5mbrn)@rCn`pajNTbdXVYXQLcwkIYqVANtnNlFqx=(5C+)7L$q9RKuD)8O6QqnHsf zcjqU^LWb#Wk21QO-JG3V#nH22z_83OUsnqzVVfM1I--FirPcjquy40>b>AIh$?sDc z0#9bzDtrb?H3>d4#c^#g+~t~;_ZLo8o8@}O#QMxzdJ4PTj2<6<(uPczH*e@qcE{LN zS(Ze3%a4b%=*sI=>wX0f5ZhHji&n0G951hXu{F?L#yImvYf8KjLMp^=^$^>DxXylG ztPlIaNHW+z7%Fm~_p9AgkM&uEz_1kAQb)S14f&zPd5D>o;a)y|GBr-@)fMQ^L? zo`04cY(~GwEiiL@&(1^?EVNzA_@NyCi5xfysYr8YU)~We_R$_+o=dh=Tq{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