diff options
author | Brent Eagles <brent@zeroc.com> | 2005-03-28 17:46:48 +0000 |
---|---|---|
committer | Brent Eagles <brent@zeroc.com> | 2005-03-28 17:46:48 +0000 |
commit | af15cb4482bcd5583598f8c33fad0b4216c481fa (patch) | |
tree | 8cdeb71670e64db940968127b579dfef8d59effb /java | |
parent | tidy an ant file (diff) | |
download | ice-af15cb4482bcd5583598f8c33fad0b4216c481fa.tar.bz2 ice-af15cb4482bcd5583598f8c33fad0b4216c481fa.tar.xz ice-af15cb4482bcd5583598f8c33fad0b4216c481fa.zip |
Removing unsupported global definitions from Slice and tests
Diffstat (limited to 'java')
-rw-r--r-- | java/test/Ice/package/AllTests.java | 68 | ||||
-rw-r--r-- | java/test/Ice/package/Client.java | 2 | ||||
-rw-r--r-- | java/test/Ice/package/InitialI.java | 28 | ||||
-rw-r--r-- | java/test/Ice/package/NoPackage.ice | 10 | ||||
-rw-r--r-- | java/test/Ice/package/Package.ice | 10 | ||||
-rw-r--r-- | java/test/Ice/package/Test.ice | 16 |
6 files changed, 7 insertions, 127 deletions
diff --git a/java/test/Ice/package/AllTests.java b/java/test/Ice/package/AllTests.java index b5c96048e73..df9a726fe6a 100644 --- a/java/test/Ice/package/AllTests.java +++ b/java/test/Ice/package/AllTests.java @@ -44,7 +44,7 @@ public class AllTests private boolean _invoked = false; } - public static InitialPrx + public static Test.InitialPrx allTests(Ice.Communicator communicator) { System.out.print("testing stringToProxy... "); @@ -56,33 +56,14 @@ public class AllTests System.out.print("testing checked cast... "); System.out.flush(); - InitialPrx initial = InitialPrxHelper.checkedCast(base); + Test.InitialPrx initial = Test.InitialPrxHelper.checkedCast(base); test(initial != null); test(initial.equals(base)); System.out.println("ok"); { - System.out.print("testing global types without package... "); - System.out.flush(); - Test1GlobalClass c = initial.getTest1GlobalClass(); - test(c != null); - try - { - initial.throwTest1GlobalException(); - test(false); - } - catch(Test1GlobalException ex) - { - // Nothing to do - } - System.out.println("ok"); - } - - { System.out.print("testing types without package... "); System.out.flush(); - Ice.Object o = initial.getTest1C2AsObject(); - test(o != null); Test1.C1 c1 = initial.getTest1C2AsC1(); test(c1 != null); test(c1 instanceof Test1.C2); @@ -119,51 +100,6 @@ public class AllTests } { - System.out.print("testing global types with package... "); - System.out.flush(); - try - { - testpkg.Test2GlobalClass c = initial.getTest2GlobalClass(); - test(false); - } - catch(Ice.NoObjectFactoryException ex) - { - // Expected - } - try - { - initial.throwTest2GlobalException(); - test(false); - } - catch(Ice.MarshalException ex) - { - // Expected - } - catch(testpkg.Test2GlobalException ex) - { - test(false); - } - - // - // Define Ice.Default.Package=testpkg and try again. - // - communicator.getProperties().setProperty("Ice.Default.Package", "testpkg"); - testpkg.Test2GlobalClass c = initial.getTest2GlobalClass(); - test(c != null); - try - { - initial.throwTest2GlobalException(); - test(false); - } - catch(testpkg.Test2GlobalException ex) - { - // Expected - } - System.out.println("ok"); - communicator.getProperties().setProperty("Ice.Default.Package", ""); - } - - { System.out.print("testing types with package... "); System.out.flush(); diff --git a/java/test/Ice/package/Client.java b/java/test/Ice/package/Client.java index ba25d2043fd..86d8916e82d 100644 --- a/java/test/Ice/package/Client.java +++ b/java/test/Ice/package/Client.java @@ -12,7 +12,7 @@ public class Client private static int run(String[] args, Ice.Communicator communicator) { - InitialPrx initial = AllTests.allTests(communicator); + Test.InitialPrx initial = AllTests.allTests(communicator); initial.shutdown(); return 0; } diff --git a/java/test/Ice/package/InitialI.java b/java/test/Ice/package/InitialI.java index 266d3bb7e51..f031a112da9 100644 --- a/java/test/Ice/package/InitialI.java +++ b/java/test/Ice/package/InitialI.java @@ -7,21 +7,8 @@ // // ********************************************************************** -public final class InitialI extends _InitialDisp +public final class InitialI extends Test._InitialDisp { - public Test1GlobalClass - getTest1GlobalClass(Ice.Current __current) - { - return new Test1GlobalClass(); - } - - public void - throwTest1GlobalException(Ice.Current __current) - throws Test1GlobalException - { - throw new Test1GlobalException(); - } - public Ice.Object getTest1C2AsObject(Ice.Current __current) { @@ -61,19 +48,6 @@ public final class InitialI extends _InitialDisp throw new Test1._notify(); } - public testpkg.Test2GlobalClass - getTest2GlobalClass(Ice.Current __current) - { - return new testpkg.Test2GlobalClass(); - } - - public void - throwTest2GlobalException(Ice.Current __current) - throws testpkg.Test2GlobalException - { - throw new testpkg.Test2GlobalException(); - } - public Ice.Object getTest2C2AsObject(Ice.Current __current) { diff --git a/java/test/Ice/package/NoPackage.ice b/java/test/Ice/package/NoPackage.ice index 8fde82ec645..1fa1154dde9 100644 --- a/java/test/Ice/package/NoPackage.ice +++ b/java/test/Ice/package/NoPackage.ice @@ -7,16 +7,6 @@ // // ********************************************************************** -class Test1GlobalClass -{ - int i; -}; - -exception Test1GlobalException -{ - int i; -}; - module Test1 { class C1 diff --git a/java/test/Ice/package/Package.ice b/java/test/Ice/package/Package.ice index 3b3e4adbb88..3baf0581816 100644 --- a/java/test/Ice/package/Package.ice +++ b/java/test/Ice/package/Package.ice @@ -9,16 +9,6 @@ [["java:package:testpkg"]] -class Test2GlobalClass -{ - int i; -}; - -exception Test2GlobalException -{ - int i; -}; - module Test2 { class C1 diff --git a/java/test/Ice/package/Test.ice b/java/test/Ice/package/Test.ice index 3472251a614..afac22ab265 100644 --- a/java/test/Ice/package/Test.ice +++ b/java/test/Ice/package/Test.ice @@ -10,17 +10,10 @@ #include <Package.ice> #include <NoPackage.ice> -// -// NOTE: When global definitions become illegal, enclose Initial in -// module Test and remove the "Global" operations. -// -//module Test -//{ +module Test +{ interface Initial { - Test1GlobalClass getTest1GlobalClass(); - void throwTest1GlobalException() throws Test1GlobalException; - Object getTest1C2AsObject(); Test1::C1 getTest1C2AsC1(); Test1::C2 getTest1C2AsC2(); @@ -28,9 +21,6 @@ interface Initial void throwTest1E2AsE2() throws Test1::E2; void throwTest1Notify() throws Test1::notify; - Test2GlobalClass getTest2GlobalClass(); - void throwTest2GlobalException() throws Test2GlobalException; - Object getTest2C2AsObject(); Test2::C1 getTest2C2AsC1(); Test2::C2 getTest2C2AsC2(); @@ -45,4 +35,4 @@ interface Initial void shutdown(); }; -//}; +}; |