diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-16 00:30:23 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-16 00:30:23 +0000 |
| commit | c8875fb97fc03779a5bba09872227b1d08e5d52a (patch) | |
| tree | a0b991cf5866ae1d616639b906ac001811d74508 /libjava/classpath/test/java.beans/DescriptorTest.java | |
| parent | c40c1730800ed292b6db39a83d592476fa59623c (diff) | |
| download | gcc-c8875fb97fc03779a5bba09872227b1d08e5d52a.tar.gz | |
Initial revision
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/test/java.beans/DescriptorTest.java')
| -rw-r--r-- | libjava/classpath/test/java.beans/DescriptorTest.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libjava/classpath/test/java.beans/DescriptorTest.java b/libjava/classpath/test/java.beans/DescriptorTest.java new file mode 100644 index 00000000000..31d2bd09077 --- /dev/null +++ b/libjava/classpath/test/java.beans/DescriptorTest.java @@ -0,0 +1,48 @@ +import java.beans.*; + +public class DescriptorTest implements Runnable { + public static void main(String[] args) { + new DescriptorTest().run(); + } + + interface TestClass { + public String[] getTest(); + public void setTest(String[] test); + public String getTest(int i); + public void setTest(int i, String name); + } + + public void run() { + try { + new PropertyDescriptor("class",java.lang.Object.class); + System.out.println("PASSED: Property Object.class"); + } catch(IntrospectionException e) { + System.out.println("FAILED: Property Object.class"); + e.printStackTrace(); + } + + try { + new IndexedPropertyDescriptor("test",TestClass.class); + System.out.println("PASSED: Indexed Property Component.location"); + } catch(IntrospectionException e) { + System.out.println("FAILED: Indexed Property Component.location"); + e.printStackTrace(); + } + + try { + new EventSetDescriptor(java.awt.Button.class,"action",java.awt.event.ActionListener.class,"actionPerformed"); + System.out.println("PASSED: Event Set Button.action"); + } catch(IntrospectionException e) { + System.out.println("FAILED: Event Set Button.action"); + e.printStackTrace(); + } + + try { + new MethodDescriptor(java.awt.Component.class.getMethod("getLocation",new Class[0])); + System.out.println("PASSED: Method Component.getLocation"); + } catch(NoSuchMethodException e) { + System.out.println("FAILED: No such method: Component.getLocation()"); + e.printStackTrace(); + } + } +}
\ No newline at end of file |
