diff options
156 files changed, 626 insertions, 915 deletions
diff --git a/cpp/src/Slice/JavaUtil.cpp b/cpp/src/Slice/JavaUtil.cpp index 6dbb2fb7be5..e8744143ae5 100644 --- a/cpp/src/Slice/JavaUtil.cpp +++ b/cpp/src/Slice/JavaUtil.cpp @@ -382,22 +382,27 @@ private: if(rest == "getset") { result.push_back(s); + continue; } else if(rest == "buffer") { result.push_back(s); + continue; } else if(rest == "tie") { result.push_back(s); + continue; } else if(rest == "UserException") { result.push_back(s); + continue; } else if(rest == "optional") { result.push_back(s); + continue; } } } diff --git a/cpp/test/Ice/checksum/ClientTypes.ice b/cpp/test/Ice/checksum/ClientTypes.ice index 66014750174..51a18734e96 100644 --- a/cpp/test/Ice/checksum/ClientTypes.ice +++ b/cpp/test/Ice/checksum/ClientTypes.ice @@ -378,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -387,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -396,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -405,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -414,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -423,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -432,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -441,34 +441,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class -// -class BaseClass9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -479,8 +461,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -495,8 +476,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -550,53 +530,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/cpp/test/Ice/checksum/ServerTypes.ice b/cpp/test/Ice/checksum/ServerTypes.ice index 76580049c9d..01456dc6e8c 100644 --- a/cpp/test/Ice/checksum/ServerTypes.ice +++ b/cpp/test/Ice/checksum/ServerTypes.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -375,7 +377,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -384,7 +386,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { int baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -393,7 +395,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(Object o); void baseOp2(int i, out string s) throws Exception1; @@ -402,7 +404,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1, Exception2; @@ -411,7 +413,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, string s) throws Exception1; @@ -420,7 +422,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(out string s) throws Exception1; @@ -429,7 +431,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s); @@ -438,33 +440,15 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 -{ - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class -// -class BaseClass9 extends EmptyClass1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 implements Interface1 +interface BaseInterface8 { - void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 extends EmptyClass1 implements Interface1 +interface BaseInterface9 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -475,8 +459,7 @@ class BaseClass11 extends EmptyClass1 implements Interface1 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -491,8 +474,7 @@ class Derived1 extends Compact1 // class Compact2(3) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -547,53 +529,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { int op(); }; diff --git a/cpp/test/Ice/custom/Wstring.ice b/cpp/test/Ice/custom/Wstring.ice index ea76ef851aa..48276b63a1f 100644 --- a/cpp/test/Ice/custom/Wstring.ice +++ b/cpp/test/Ice/custom/Wstring.ice @@ -26,7 +26,7 @@ exception WstringException string reason; }; -class WstringClass +interface WstringClass { string opString(string s1, out string s2); @@ -34,8 +34,6 @@ class WstringClass void throwExcept(string reason) throws WstringException; - - string s; }; }; @@ -57,7 +55,7 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr string reason; }; -["cpp:type:wstring"] class WstringClass +["cpp:type:wstring"] interface WstringClass { string opString(string s1, out string s2); @@ -65,8 +63,6 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr void throwExcept(string reason) throws WstringException; - - string s; }; }; diff --git a/cpp/test/Ice/custom/WstringAMD.ice b/cpp/test/Ice/custom/WstringAMD.ice index 298a89e9280..2f8e04c7f86 100644 --- a/cpp/test/Ice/custom/WstringAMD.ice +++ b/cpp/test/Ice/custom/WstringAMD.ice @@ -26,7 +26,7 @@ exception WstringException string reason; }; -["amd"] class WstringClass +["amd"] interface WstringClass { string opString(string s1, out string s2); @@ -34,8 +34,6 @@ exception WstringException void throwExcept(string reason) throws WstringException; - - string s; }; }; @@ -57,7 +55,7 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr string reason; }; -["amd", "cpp:type:wstring"] class WstringClass +["amd", "cpp:type:wstring"] interface WstringClass { string opString(string s1, out string s2); @@ -65,8 +63,6 @@ dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStr void throwExcept(string reason) throws WstringException; - - string s; }; }; diff --git a/cpp/test/Ice/gc/Test.ice b/cpp/test/Ice/gc/Test.ice index 56a112ad2f2..b6bab2adf8a 100644 --- a/cpp/test/Ice/gc/Test.ice +++ b/cpp/test/Ice/gc/Test.ice @@ -171,7 +171,6 @@ module DDD class C { - void op(); }; class C2; diff --git a/cpp/test/Ice/inheritance/Test.ice b/cpp/test/Ice/inheritance/Test.ice index 40a948a9f58..39139a9d7c9 100644 --- a/cpp/test/Ice/inheritance/Test.ice +++ b/cpp/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/cpp/test/Ice/invoke/Test.ice b/cpp/test/Ice/invoke/Test.ice index 53cb3e2ac74..5349b38ee5a 100644 --- a/cpp/test/Ice/invoke/Test.ice +++ b/cpp/test/Ice/invoke/Test.ice @@ -16,7 +16,7 @@ exception MyException { }; -class MyClass +interface MyClass { void opOneway(); diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index d26ec624039..08308818f21 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -9,7 +9,7 @@ #include <Ice/Ice.h> #include <TestCommon.h> -#include <Test.h> +#include <TestI.h> #ifdef _MSC_VER // For 'Ice::Communicator::addObjectFactory()' deprecation @@ -252,12 +252,12 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing protected members... " << flush; - EPtr e = initial->getE(); - FPtr f = initial->getF(); + EIPtr e = ICE_DYNAMIC_CAST(EI, initial->getE()); + FIPtr f = ICE_DYNAMIC_CAST(FI, initial->getF()); #ifndef ICE_CPP11_MAPPING test(e->checkValues()); test(f->checkValues()); - test(f->e2->checkValues()); + test(ICE_DYNAMIC_CAST(EI, f->e2)->checkValues()); #endif cout << "ok" << endl; diff --git a/cpp/test/Ice/objects/Test.ice b/cpp/test/Ice/objects/Test.ice index a6a502d18e0..32183c734ba 100644 --- a/cpp/test/Ice/objects/Test.ice +++ b/cpp/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -72,16 +74,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I @@ -169,7 +167,7 @@ exception EDerived extends EBase A1 a4; }; -class Initial +interface Initial { void shutdown(); B getB1(); diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp index a9c453ee104..dd57dea7762 100644 --- a/cpp/test/Ice/objects/TestI.cpp +++ b/cpp/test/Ice/objects/TestI.cpp @@ -55,7 +55,7 @@ EI::EI() : } bool -EI::checkValues(const Ice::Current&) +EI::checkValues() { return i == 1 && s == "hello"; } @@ -70,7 +70,7 @@ FI::FI(const EPtr& e) : } bool -FI::checkValues(const Ice::Current&) +FI::checkValues() { return e1 && e1 == e2; } diff --git a/cpp/test/Ice/objects/TestI.h b/cpp/test/Ice/objects/TestI.h index 177d2b01864..473c7b40bbf 100644 --- a/cpp/test/Ice/objects/TestI.h +++ b/cpp/test/Ice/objects/TestI.h @@ -43,8 +43,9 @@ public: EI(); - virtual bool checkValues(const Ice::Current&); + bool checkValues(); }; +ICE_DEFINE_PTR(EIPtr, EI); class FI : public Test::F { @@ -53,8 +54,9 @@ public: FI(); FI(const Test::EPtr&); - virtual bool checkValues(const Ice::Current&); + bool checkValues(); }; +ICE_DEFINE_PTR(FIPtr, FI); #ifdef ICE_CPP11_MAPPING class II : public ::Ice::InterfaceByValue<Test::I> diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice index ca350559c8a..b8b1d40acc2 100644 --- a/cpp/test/Ice/operations/Test.ice +++ b/cpp/test/Ice/operations/Test.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -94,7 +94,7 @@ dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; exception SomeException {}; -class MyClass +interface MyClass { void shutdown(); @@ -278,7 +278,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/cpp/test/Ice/operations/TestAMD.ice b/cpp/test/Ice/operations/TestAMD.ice index beb82b356cc..47d395fa025 100644 --- a/cpp/test/Ice/operations/TestAMD.ice +++ b/cpp/test/Ice/operations/TestAMD.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -92,7 +92,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); @@ -277,7 +277,7 @@ class MyClass1 }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/cpp/test/Ice/optional/Test.ice b/cpp/test/Ice/optional/Test.ice index ebf60d3a15f..1cd8fa19869 100644 --- a/cpp/test/Ice/optional/Test.ice +++ b/cpp/test/Ice/optional/Test.ice @@ -196,11 +196,12 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/cpp/test/Ice/optional/TestAMD.ice b/cpp/test/Ice/optional/TestAMD.ice index 5ae931827f9..e4c19cde393 100644 --- a/cpp/test/Ice/optional/TestAMD.ice +++ b/cpp/test/Ice/optional/TestAMD.ice @@ -196,12 +196,13 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; ["amd"] -class Initial +interface Initial { void shutdown(); diff --git a/cpp/test/Ice/proxy/Test.ice b/cpp/test/Ice/proxy/Test.ice index 239c473918a..46912931594 100644 --- a/cpp/test/Ice/proxy/Test.ice +++ b/cpp/test/Ice/proxy/Test.ice @@ -14,14 +14,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/cpp/test/Ice/proxy/TestAMD.ice b/cpp/test/Ice/proxy/TestAMD.ice index 1df348cef04..4c5e5afa003 100644 --- a/cpp/test/Ice/proxy/TestAMD.ice +++ b/cpp/test/Ice/proxy/TestAMD.ice @@ -14,14 +14,14 @@ module Test { -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); Ice::Context getContext(); }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/cpp/test/Slice/escape/Key.ice b/cpp/test/Slice/escape/Key.ice index 86d9288493f..a5f27867aae 100644 --- a/cpp/test/Slice/escape/Key.ice +++ b/cpp/test/Slice/escape/Key.ice @@ -40,7 +40,8 @@ interface char class switch { int if; - void foo(char* export, out int volatile); + char* export; + int volatile; }; class do extends switch implements char, break @@ -63,9 +64,9 @@ exception sizeof extends return local interface friend { - auto goto(continue if, auto d, delete inline, switch private, do mutable, break* namespace, - char* new, switch* not, do* operator, int or, int protected, int public, int register) - throws return, sizeof; + auto goto(continue if, auto d, delete inline, switch private, do mutable, break* namespace, + char* new, switch* not, do* operator, int or, int protected, int public, int register) + throws return, sizeof; }; const int template = 0; diff --git a/cpp/test/Slice/parser/CircularA.ice b/cpp/test/Slice/parser/CircularA.ice index 3beb0827682..c7fb719391f 100644 --- a/cpp/test/Slice/parser/CircularA.ice +++ b/cpp/test/Slice/parser/CircularA.ice @@ -14,7 +14,7 @@ module Test { -class A +interface A { void shutdown(); }; diff --git a/cpp/test/Slice/parser/CircularB.ice b/cpp/test/Slice/parser/CircularB.ice index c27f65d5e27..4df135fefdb 100644 --- a/cpp/test/Slice/parser/CircularB.ice +++ b/cpp/test/Slice/parser/CircularB.ice @@ -14,7 +14,7 @@ module Test { -class B +interface B { void shutdown(); }; diff --git a/csharp/test/Ice/checksum/AllTests.cs b/csharp/test/Ice/checksum/AllTests.cs index 353b4763c40..574066ca41e 100644 --- a/csharp/test/Ice/checksum/AllTests.cs +++ b/csharp/test/Ice/checksum/AllTests.cs @@ -53,13 +53,13 @@ public class AllTests : TestCommon.AllTests if(start != -1) { int end = start; - while(end < key.Length && Char.IsDigit(key[end])) + while(end < key.Length && char.IsDigit(key[end])) { end++; } - int n = Int32.Parse(key.Substring(start, end - start)); + int n = int.Parse(key.Substring(start, end - start)); - string value = (string)Ice.SliceChecksums.checksums[key]; + string value = Ice.SliceChecksums.checksums[key]; test(value != null); if(n <= 1) diff --git a/csharp/test/Ice/checksum/ClientTypes.ice b/csharp/test/Ice/checksum/ClientTypes.ice index 66014750174..61b9a2232ec 100644 --- a/csharp/test/Ice/checksum/ClientTypes.ice +++ b/csharp/test/Ice/checksum/ClientTypes.ice @@ -378,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -387,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -396,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -405,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -414,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -423,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -432,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -441,16 +441,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class +// TEST: Add base interface // -class BaseClass9 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -459,16 +459,7 @@ class BaseClass9 // // TEST: Add interface // -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface -// -class BaseClass11 +interface BaseInterface10 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -479,8 +470,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -495,8 +485,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -550,53 +539,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/csharp/test/Ice/checksum/ServerTypes.ice b/csharp/test/Ice/checksum/ServerTypes.ice index 76580049c9d..8916d03dace 100644 --- a/csharp/test/Ice/checksum/ServerTypes.ice +++ b/csharp/test/Ice/checksum/ServerTypes.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -375,7 +377,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -384,7 +386,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { int baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -393,7 +395,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(Object o); void baseOp2(int i, out string s) throws Exception1; @@ -402,7 +404,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1, Exception2; @@ -411,7 +413,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, string s) throws Exception1; @@ -420,7 +422,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(out string s) throws Exception1; @@ -429,7 +431,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s); @@ -438,15 +440,15 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class +// TEST: Add base interface // -class BaseClass9 extends EmptyClass1 +interface BaseInterface9 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -455,16 +457,7 @@ class BaseClass9 extends EmptyClass1 // // TEST: Add interface // -class BaseClass10 implements Interface1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface -// -class BaseClass11 extends EmptyClass1 implements Interface1 +interface BaseInterface10 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -475,8 +468,7 @@ class BaseClass11 extends EmptyClass1 implements Interface1 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -491,8 +483,7 @@ class Derived1 extends Compact1 // class Compact2(3) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -547,53 +538,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { int op(); }; diff --git a/csharp/test/Ice/defaultValue/Test.ice b/csharp/test/Ice/defaultValue/Test.ice index 67514ca2eba..e3b08ba1b69 100644 --- a/csharp/test/Ice/defaultValue/Test.ice +++ b/csharp/test/Ice/defaultValue/Test.ice @@ -13,6 +13,7 @@ // Suppress warnings // [["suppress-warning:invalid-metadata, deprecated"]] + module Test { diff --git a/csharp/test/Ice/dictMapping/Test.ice b/csharp/test/Ice/dictMapping/Test.ice index d9d11203b70..1f9481d59a9 100644 --- a/csharp/test/Ice/dictMapping/Test.ice +++ b/csharp/test/Ice/dictMapping/Test.ice @@ -35,7 +35,7 @@ dictionary<string, GIS> NDGIS; dictionary<string, ASS> NDASS; dictionary<string, GSS> NDGSS; -class MyClass +interface MyClass { void shutdown(); diff --git a/csharp/test/Ice/dictMapping/TestAMD.ice b/csharp/test/Ice/dictMapping/TestAMD.ice index fa7501c366d..dbf1d89d528 100644 --- a/csharp/test/Ice/dictMapping/TestAMD.ice +++ b/csharp/test/Ice/dictMapping/TestAMD.ice @@ -29,7 +29,7 @@ dictionary<string, GIS> NDGIS; dictionary<string, ASS> NDASS; dictionary<string, GSS> NDGSS; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); diff --git a/csharp/test/Ice/inheritance/Test.ice b/csharp/test/Ice/inheritance/Test.ice index 2e9b176c00b..28faa3b8c9e 100644 --- a/csharp/test/Ice/inheritance/Test.ice +++ b/csharp/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/csharp/test/Ice/invoke/Test.ice b/csharp/test/Ice/invoke/Test.ice index aca42de1940..145b9dc0da3 100644 --- a/csharp/test/Ice/invoke/Test.ice +++ b/csharp/test/Ice/invoke/Test.ice @@ -17,7 +17,7 @@ exception MyException { }; -class MyClass +interface MyClass { void opOneway(); diff --git a/csharp/test/Ice/objects/Test.ice b/csharp/test/Ice/objects/Test.ice index c66bf00caed..7f700455e65 100644 --- a/csharp/test/Ice/objects/Test.ice +++ b/csharp/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -67,16 +69,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I @@ -164,7 +162,7 @@ exception EDerived extends EBase A1 a4; }; -class Initial +interface Initial { void shutdown(); B getB1(); diff --git a/csharp/test/Ice/operations/Test.ice b/csharp/test/Ice/operations/Test.ice index 72c2b857828..e20fad3b63c 100644 --- a/csharp/test/Ice/operations/Test.ice +++ b/csharp/test/Ice/operations/Test.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -93,7 +93,7 @@ dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; exception SomeException {}; -class MyClass +interface MyClass { void shutdown(); @@ -277,7 +277,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["cs:tie"] class MyDerivedClass extends MyClass +["cs:tie"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/csharp/test/Ice/operations/TestAMD.ice b/csharp/test/Ice/operations/TestAMD.ice index 6145d1fa002..7a10b7dfa23 100644 --- a/csharp/test/Ice/operations/TestAMD.ice +++ b/csharp/test/Ice/operations/TestAMD.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -91,7 +91,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); @@ -275,7 +275,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["amd", "cs:tie"] class MyDerivedClass extends MyClass +["amd", "cs:tie"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/csharp/test/Ice/operations/Twoways.cs b/csharp/test/Ice/operations/Twoways.cs index e4af24c21f0..53f3d62888d 100644 --- a/csharp/test/Ice/operations/Twoways.cs +++ b/csharp/test/Ice/operations/Twoways.cs @@ -137,13 +137,12 @@ class Twoways p.ice_ping(); - test(Test.MyClassPrxHelper.ice_staticId().Equals(Test.MyClass.ice_staticId())); + test(Test.MyClassPrxHelper.ice_staticId().Equals(Test.MyClassDisp_.ice_staticId())); test(Ice.ObjectPrxHelper.ice_staticId().Equals(Ice.ObjectImpl.ice_staticId())); - test(p.ice_isA(Test.MyClass.ice_staticId())); - - test(p.ice_id().Equals(Test.MyDerivedClass.ice_staticId())); + test(p.ice_isA(Test.MyClassDisp_.ice_staticId())); + test(p.ice_id().Equals(Test.MyDerivedClassDisp_.ice_staticId())); { string[] ids = p.ice_ids(); diff --git a/csharp/test/Ice/operations/TwowaysAMI.cs b/csharp/test/Ice/operations/TwowaysAMI.cs index c93f4257a85..3d08a34b8db 100644 --- a/csharp/test/Ice/operations/TwowaysAMI.cs +++ b/csharp/test/Ice/operations/TwowaysAMI.cs @@ -130,7 +130,7 @@ public class TwowaysAMI public void ice_id(string id) { - test(id.Equals(Test.MyDerivedClass.ice_staticId())); + test(id.Equals(Test.MyDerivedClassDisp_.ice_staticId())); called(); } @@ -1031,23 +1031,23 @@ public class TwowaysAMI } { - test(p.ice_isAAsync(Test.MyClass.ice_staticId()).Result); + test(p.ice_isAAsync(Test.MyClassDisp_.ice_staticId()).Result); } { - Ice.AsyncResult r = p.begin_ice_isA(Test.MyClass.ice_staticId()); + Ice.AsyncResult r = p.begin_ice_isA(Test.MyClassDisp_.ice_staticId()); test(p.end_ice_isA(r)); } { Callback cb = new Callback(); - p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted(cb.ice_isA, cb.exCB); + p.begin_ice_isA(Test.MyClassDisp_.ice_staticId()).whenCompleted(cb.ice_isA, cb.exCB); cb.check(); } { Callback cb = new Callback(); - p.begin_ice_isA(Test.MyClass.ice_staticId()).whenCompleted( + p.begin_ice_isA(Test.MyClassDisp_.ice_staticId()).whenCompleted( (bool v) => { cb.ice_isA(v); @@ -1089,12 +1089,12 @@ public class TwowaysAMI } { - test(p.ice_idAsync().Result.Equals(Test.MyDerivedClass.ice_staticId())); + test(p.ice_idAsync().Result.Equals(Test.MyDerivedClassDisp_.ice_staticId())); } { Ice.AsyncResult r = p.begin_ice_id(); - test(p.end_ice_id(r).Equals(Test.MyDerivedClass.ice_staticId())); + test(p.end_ice_id(r).Equals(Test.MyDerivedClassDisp_.ice_staticId())); } { diff --git a/csharp/test/Ice/optional/Test.ice b/csharp/test/Ice/optional/Test.ice index de9cafe9339..9e5727758f4 100644 --- a/csharp/test/Ice/optional/Test.ice +++ b/csharp/test/Ice/optional/Test.ice @@ -202,7 +202,7 @@ class Recursive optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/csharp/test/Ice/optional/TestAMD.ice b/csharp/test/Ice/optional/TestAMD.ice index 6621246fe41..29d181a3991 100644 --- a/csharp/test/Ice/optional/TestAMD.ice +++ b/csharp/test/Ice/optional/TestAMD.ice @@ -202,7 +202,7 @@ class Recursive { }; ["amd"] -class Initial +interface Initial { void shutdown(); diff --git a/csharp/test/Ice/proxy/Test.ice b/csharp/test/Ice/proxy/Test.ice index 687da354569..2b236bfb478 100644 --- a/csharp/test/Ice/proxy/Test.ice +++ b/csharp/test/Ice/proxy/Test.ice @@ -15,14 +15,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/csharp/test/Ice/proxy/TestAMD.ice b/csharp/test/Ice/proxy/TestAMD.ice index 3b94c53c95b..268a6948c89 100644 --- a/csharp/test/Ice/proxy/TestAMD.ice +++ b/csharp/test/Ice/proxy/TestAMD.ice @@ -15,14 +15,14 @@ module Test { -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); Ice::Context getContext(); }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/csharp/test/Ice/seqMapping/Test.ice b/csharp/test/Ice/seqMapping/Test.ice index 0846e0b6093..06df3520a4b 100644 --- a/csharp/test/Ice/seqMapping/Test.ice +++ b/csharp/test/Ice/seqMapping/Test.ice @@ -131,7 +131,7 @@ sequence<En> AEnS; ["clr:serializable:Serialize.Large"] sequence<byte> SerialLarge; ["clr:serializable:Serialize.Struct"] sequence<byte> SerialStruct; -class MyClass +interface MyClass { void shutdown(); diff --git a/csharp/test/Ice/seqMapping/TestAMD.ice b/csharp/test/Ice/seqMapping/TestAMD.ice index f0d86ad70d9..880f5c34d54 100644 --- a/csharp/test/Ice/seqMapping/TestAMD.ice +++ b/csharp/test/Ice/seqMapping/TestAMD.ice @@ -131,7 +131,7 @@ sequence<En> AEnS; ["clr:serializable:Serialize.Large"] sequence<byte> SerialLarge; ["clr:serializable:Serialize.Struct"] sequence<byte> SerialStruct; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); diff --git a/csharp/test/Slice/escape/Client.cs b/csharp/test/Slice/escape/Client.cs index ec57758db9d..ada2557895d 100644 --- a/csharp/test/Slice/escape/Client.cs +++ b/csharp/test/Slice/escape/Client.cs @@ -37,14 +37,6 @@ public class Client } } - public sealed class delegateI : @abstract.delegateDisp_ - { - public override void foo(@abstract.casePrx @else, out int @event, Ice.Current current) - { - @event = 0; - } - } - public sealed class explicitI : @abstract.explicitDisp_ { public override Task<int> @@ -57,17 +49,12 @@ public class Client { test(current.operation == "default"); } - - public override void foo(@abstract.casePrx @else, out int @event, Ice.Current current) - { - @event = 0; - } } public sealed class implicitI : @abstract.@implicit { public @abstract.@as @in(@abstract.@break @internal, @abstract.@delegate @is, @abstract.@explicit @lock, - @abstract.casePrx @namespace, @abstract.decimalPrx @new, @abstract.delegatePrx @null, + @abstract.casePrx @namespace, @abstract.decimalPrx @new, @abstract.@delegate @null, @abstract.explicitPrx @operator, int @override, int @params, int @private) { return @abstract.@as.@base; @@ -115,7 +102,7 @@ public class Client test(d1 == null); @abstract.@delegate e = new @abstract.@delegate(); test(e != null); - @abstract.@delegatePrx e1 = null; + @abstract.@delegate e1 = null; test(e1 == null); @abstract.@explicit f = new @abstract.@explicit(); test(f != null); diff --git a/csharp/test/Slice/escape/Key.ice b/csharp/test/Slice/escape/Key.ice index fb93dc2b69d..65a42f92e9b 100644 --- a/csharp/test/Slice/escape/Key.ice +++ b/csharp/test/Slice/escape/Key.ice @@ -7,6 +7,8 @@ // // ********************************************************************** +#pragma once + module abstract { @@ -33,7 +35,8 @@ interface decimal class delegate { int if; - void foo(case* else, out int event); + case* else; + int event; }; class explicit extends delegate implements decimal, case @@ -113,7 +116,7 @@ exception BaseMethods local interface implicit { - as in(break internal, delegate is, explicit lock, case* namespace, decimal* new, delegate* null, + as in(break internal, delegate is, explicit lock, case* namespace, decimal* new, delegate null, explicit* operator, int override, int params, int private) throws fixed, foreach; }; diff --git a/java-compat/test/src/main/java/test/Ice/checksum/Types.ice b/java-compat/test/src/main/java/test/Ice/checksum/Types.ice index 89c9eee01d3..95f5afc7728 100644 --- a/java-compat/test/src/main/java/test/Ice/checksum/Types.ice +++ b/java-compat/test/src/main/java/test/Ice/checksum/Types.ice @@ -379,7 +379,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -388,7 +388,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -397,7 +397,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -406,7 +406,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -415,7 +415,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -424,7 +424,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -433,7 +433,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -442,34 +442,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class -// -class BaseClass9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -480,8 +462,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -496,8 +477,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -551,53 +531,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/java-compat/test/src/main/java/test/Ice/checksum/TypesServer.ice b/java-compat/test/src/main/java/test/Ice/checksum/TypesServer.ice index 0774d423249..a210ad16704 100644 --- a/java-compat/test/src/main/java/test/Ice/checksum/TypesServer.ice +++ b/java-compat/test/src/main/java/test/Ice/checksum/TypesServer.ice @@ -10,6 +10,7 @@ #pragma once [["java:package:test.Ice.checksum.server"]] +[["suppress-warning:deprecated"]] // For classes with operations module Test { @@ -376,7 +377,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -385,7 +386,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { int baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -394,7 +395,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(Object o); void baseOp2(int i, out string s) throws Exception1; @@ -403,7 +404,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1, Exception2; @@ -412,7 +413,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, string s) throws Exception1; @@ -421,7 +422,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(out string s) throws Exception1; @@ -430,7 +431,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s); @@ -439,7 +440,7 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp2(int i, out string s) throws Exception1; }; @@ -447,25 +448,7 @@ class BaseClass8 // // TEST: Add base class // -class BaseClass9 extends EmptyClass1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 implements Interface1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface -// -class BaseClass11 extends EmptyClass1 implements Interface1 +interface BaseInterface9 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -476,8 +459,7 @@ class BaseClass11 extends EmptyClass1 implements Interface1 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -492,8 +474,7 @@ class Derived1 extends Compact1 // class Compact2(3) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -507,7 +488,7 @@ class Optional0 }; // -// TEST: Class with optional members, different order, same tags. +// TEST: Interface with optional members, different order, same tags. // class Optional1 { @@ -517,7 +498,7 @@ class Optional1 }; // -// TEST: Class with different optional members. +// TEST: Interface with different optional members. // class Optional2 { @@ -527,7 +508,7 @@ class Optional2 }; // -// TEST: Class with different optional members. +// TEST: Interface with different optional members. // class Optional3 { @@ -538,7 +519,7 @@ class Optional3 }; // -// TEST: Class with optional members using different tags. +// TEST: Interface with optional members using different tags. // class Optional4 { @@ -548,53 +529,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { int op(); }; diff --git a/java-compat/test/src/main/java/test/Ice/classLoader/Test.ice b/java-compat/test/src/main/java/test/Ice/classLoader/Test.ice index 551c600020f..910df84e1ad 100644 --- a/java-compat/test/src/main/java/test/Ice/classLoader/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/classLoader/Test.ice @@ -10,6 +10,7 @@ #pragma once [["java:package:test.Ice.classLoader"]] +[["suppress-warning:deprecated"]] // For classes with operations module Test { diff --git a/java-compat/test/src/main/java/test/Ice/custom/Test.ice b/java-compat/test/src/main/java/test/Ice/custom/Test.ice index 42d7faae656..e17a1e315b4 100644 --- a/java-compat/test/src/main/java/test/Ice/custom/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/custom/Test.ice @@ -51,7 +51,7 @@ dictionary<int, string> D; ["java:type:java.util.LinkedList<java.util.List<String>>"] sequence<StringSeq> StringSeqSeq; -class TestIntf +interface TestIntf { CSeq opCSeq(CSeq inSeq, out CSeq outSeq); CArray opCArray(CArray inSeq, out CArray outSeq); @@ -77,8 +77,6 @@ class TestIntf DoubleBuffer opDoubleBufferSeq(DoubleBuffer inSeq, out DoubleBuffer outSeq); void shutdown(); - - ["java:type:java.util.ArrayList<C>"] CSeq seq; }; }; diff --git a/java-compat/test/src/main/java/test/Ice/custom/TestI.java b/java-compat/test/src/main/java/test/Ice/custom/TestI.java index 6ce5451516f..77e9f8f02cb 100644 --- a/java-compat/test/src/main/java/test/Ice/custom/TestI.java +++ b/java-compat/test/src/main/java/test/Ice/custom/TestI.java @@ -38,9 +38,9 @@ import test.Ice.custom.Test.SSeqHolder; import test.Ice.custom.Test.ShortSeqHolder; import test.Ice.custom.Test.StringSeqHolder; import test.Ice.custom.Test.StringSeqSeqHolder; -import test.Ice.custom.Test.TestIntf; +import test.Ice.custom.Test._TestIntfDisp; -public final class TestI extends TestIntf +public final class TestI extends _TestIntfDisp { public TestI(Ice.Communicator communicator) @@ -238,4 +238,5 @@ public final class TestI extends TestIntf } private Ice.Communicator _communicator; + private java.util.ArrayList<C> seq; } diff --git a/java-compat/test/src/main/java/test/Ice/defaultValue/Test.ice b/java-compat/test/src/main/java/test/Ice/defaultValue/Test.ice index 4e0281ef5df..3e630c25ae4 100644 --- a/java-compat/test/src/main/java/test/Ice/defaultValue/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/defaultValue/Test.ice @@ -10,6 +10,7 @@ #pragma once [["java:package:test.Ice.defaultValue"]] +[["suppress-warning:deprecated"]] // For enumerator references module Test { diff --git a/java-compat/test/src/main/java/test/Ice/inheritance/Test.ice b/java-compat/test/src/main/java/test/Ice/inheritance/Test.ice index 83f212381cb..f48ff12cc93 100644 --- a/java-compat/test/src/main/java/test/Ice/inheritance/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/inheritance/Test.ice @@ -10,6 +10,8 @@ #pragma once [["java:package:test.Ice.inheritance"]] +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/java-compat/test/src/main/java/test/Ice/invoke/Test.ice b/java-compat/test/src/main/java/test/Ice/invoke/Test.ice index aca42de1940..145b9dc0da3 100644 --- a/java-compat/test/src/main/java/test/Ice/invoke/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/invoke/Test.ice @@ -17,7 +17,7 @@ exception MyException { }; -class MyClass +interface MyClass { void opOneway(); diff --git a/java-compat/test/src/main/java/test/Ice/objects/Test.ice b/java-compat/test/src/main/java/test/Ice/objects/Test.ice index 6172f7f3323..d7ba9284d6c 100644 --- a/java-compat/test/src/main/java/test/Ice/objects/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/objects/Test.ice @@ -10,6 +10,8 @@ #pragma once [["java:package:test.Ice.objects"]] +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/java-compat/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java b/java-compat/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java index 6243298e8aa..33c86b7678a 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java +++ b/java-compat/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java @@ -14,7 +14,7 @@ import test.Ice.operations.AMD.Test.*; import java.util.*; -public final class AMDMyDerivedClassI extends MyDerivedClass +public final class AMDMyDerivedClassI extends _MyDerivedClassDisp { private static void test(boolean b) diff --git a/java-compat/test/src/main/java/test/Ice/operations/MyDerivedClassI.java b/java-compat/test/src/main/java/test/Ice/operations/MyDerivedClassI.java index 73cf592f958..a2d5c82455b 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/MyDerivedClassI.java +++ b/java-compat/test/src/main/java/test/Ice/operations/MyDerivedClassI.java @@ -14,7 +14,7 @@ import test.Ice.operations.Test.*; import java.util.*; -public final class MyDerivedClassI extends MyDerivedClass +public final class MyDerivedClassI extends _MyDerivedClassDisp { private static void test(boolean b) diff --git a/java-compat/test/src/main/java/test/Ice/operations/Test.ice b/java-compat/test/src/main/java/test/Ice/operations/Test.ice index faf3f2cb495..d792df8a858 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/operations/Test.ice @@ -22,7 +22,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -92,7 +92,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -276,7 +276,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["java:tie"] class MyDerivedClass extends MyClass +["java:tie"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/java-compat/test/src/main/java/test/Ice/operations/TestAMD.ice b/java-compat/test/src/main/java/test/Ice/operations/TestAMD.ice index fb5d05a1f12..45006b9b282 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/TestAMD.ice +++ b/java-compat/test/src/main/java/test/Ice/operations/TestAMD.ice @@ -22,7 +22,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -92,7 +92,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); @@ -276,7 +276,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["amd", "java:tie"] class MyDerivedClass extends MyClass +["amd", "java:tie"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/java-compat/test/src/main/java/test/Ice/operations/Twoways.java b/java-compat/test/src/main/java/test/Ice/operations/Twoways.java index 189c448d309..04f6858ba31 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/Twoways.java +++ b/java-compat/test/src/main/java/test/Ice/operations/Twoways.java @@ -137,11 +137,11 @@ class Twoways p.ice_ping(); - test(p.ice_isA(MyClass.ice_staticId())); + test(p.ice_isA(_MyClassDisp.ice_staticId())); - test(p.ice_id().equals(MyDerivedClass.ice_staticId())); + test(p.ice_id().equals(_MyDerivedClassDisp.ice_staticId())); - test(MyDerivedClassPrxHelper.ice_staticId().equals(MyDerivedClass.ice_staticId())); + test(MyDerivedClassPrxHelper.ice_staticId().equals(_MyDerivedClassDisp.ice_staticId())); test(ObjectPrxHelper.ice_staticId().equals(Object.ice_staticId)); test(LocatorPrxHelper.ice_staticId().equals(Locator.ice_staticId)); diff --git a/java-compat/test/src/main/java/test/Ice/operations/TwowaysAMI.java b/java-compat/test/src/main/java/test/Ice/operations/TwowaysAMI.java index 7a0a441d27c..e5f0e71e901 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/TwowaysAMI.java +++ b/java-compat/test/src/main/java/test/Ice/operations/TwowaysAMI.java @@ -62,10 +62,10 @@ import test.Ice.operations.Test.Callback_MyClass_opStringStringSD; import test.Ice.operations.Test.Callback_MyClass_opStruct; import test.Ice.operations.Test.Callback_MyClass_opVoid; import test.Ice.operations.Test.Callback_MyDerivedClass_opDerived; -import test.Ice.operations.Test.MyClass; +import test.Ice.operations.Test._MyClassDisp; import test.Ice.operations.Test.MyClassPrx; import test.Ice.operations.Test.MyClassPrxHelper; -import test.Ice.operations.Test.MyDerivedClass; +import test.Ice.operations.Test._MyDerivedClassDisp; import test.Ice.operations.Test.MyDerivedClassPrx; import test.Ice.operations.Test.MyDerivedClassPrxHelper; import test.Ice.operations.Test.MyEnum; @@ -206,7 +206,7 @@ class TwowaysAMI @Override public void response(String id) { - test(id.equals(MyDerivedClass.ice_staticId())); + test(id.equals(_MyDerivedClassDisp.ice_staticId())); callback.called(); } @@ -1921,7 +1921,7 @@ class TwowaysAMI { isAI cb = new isAI(); - p.begin_ice_isA(MyClass.ice_staticId(), cb); + p.begin_ice_isA(_MyClassDisp.ice_staticId(), cb); cb.check(); } diff --git a/java-compat/test/src/main/java/test/Ice/operations/lambda/TwowaysLambdaAMI.java b/java-compat/test/src/main/java/test/Ice/operations/lambda/TwowaysLambdaAMI.java index 204790269c7..fdf51d2c398 100644 --- a/java-compat/test/src/main/java/test/Ice/operations/lambda/TwowaysLambdaAMI.java +++ b/java-compat/test/src/main/java/test/Ice/operations/lambda/TwowaysLambdaAMI.java @@ -10,9 +10,9 @@ package test.Ice.operations.lambda; import test.Ice.operations.Test.AnotherStruct; -import test.Ice.operations.Test.MyClass; +import test.Ice.operations.Test._MyClassDisp; import test.Ice.operations.Test.MyClassPrx; -import test.Ice.operations.Test.MyDerivedClass; +import test.Ice.operations.Test._MyDerivedClassDisp; import test.Ice.operations.Test.MyDerivedClassPrx; import test.Ice.operations.Test.MyDerivedClassPrxHelper; import test.Ice.operations.Test.MyEnum; @@ -100,7 +100,7 @@ public class TwowaysLambdaAMI { public void response(String id) { - test(id.equals(MyDerivedClass.ice_staticId())); + test(id.equals(_MyDerivedClassDisp.ice_staticId())); callback.called(); } @@ -947,7 +947,7 @@ public class TwowaysLambdaAMI { isAI cb = new isAI(); - p.begin_ice_isA(MyClass.ice_staticId(), (boolean r) -> cb.response(r), (Ice.Exception ex) -> test(false)); + p.begin_ice_isA(_MyClassDisp.ice_staticId(), (boolean r) -> cb.response(r), (Ice.Exception ex) -> test(false)); cb.check(); } diff --git a/java-compat/test/src/main/java/test/Ice/optional/AMDInitialI.java b/java-compat/test/src/main/java/test/Ice/optional/AMDInitialI.java index 3bd97d11755..47526a926dd 100644 --- a/java-compat/test/src/main/java/test/Ice/optional/AMDInitialI.java +++ b/java-compat/test/src/main/java/test/Ice/optional/AMDInitialI.java @@ -11,7 +11,7 @@ package test.Ice.optional; import test.Ice.optional.AMD.Test.*; -public final class AMDInitialI extends Initial +public final class AMDInitialI extends _InitialDisp { @Override public void diff --git a/java-compat/test/src/main/java/test/Ice/optional/InitialI.java b/java-compat/test/src/main/java/test/Ice/optional/InitialI.java index ffa2dbd11e1..505805ee795 100644 --- a/java-compat/test/src/main/java/test/Ice/optional/InitialI.java +++ b/java-compat/test/src/main/java/test/Ice/optional/InitialI.java @@ -11,7 +11,7 @@ package test.Ice.optional; import test.Ice.optional.Test.*; -public final class InitialI extends Initial +public final class InitialI extends _InitialDisp { @Override public void diff --git a/java-compat/test/src/main/java/test/Ice/optional/Test.ice b/java-compat/test/src/main/java/test/Ice/optional/Test.ice index 596f2102d77..bdc71ef5ba2 100644 --- a/java-compat/test/src/main/java/test/Ice/optional/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/optional/Test.ice @@ -197,7 +197,7 @@ class Recursive { optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/java-compat/test/src/main/java/test/Ice/optional/TestAMD.ice b/java-compat/test/src/main/java/test/Ice/optional/TestAMD.ice index 2fc1437cf73..4ff299271c0 100644 --- a/java-compat/test/src/main/java/test/Ice/optional/TestAMD.ice +++ b/java-compat/test/src/main/java/test/Ice/optional/TestAMD.ice @@ -193,12 +193,13 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; ["amd"] -class Initial +interface Initial { void shutdown(); diff --git a/java-compat/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java b/java-compat/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java index 68886fa161c..3e522f64775 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java +++ b/java-compat/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java @@ -11,9 +11,9 @@ package test.Ice.proxy; import test.Ice.proxy.AMD.Test.AMD_MyClass_getContext; import test.Ice.proxy.AMD.Test.AMD_MyClass_shutdown; import test.Ice.proxy.AMD.Test.AMD_MyDerivedClass_echo; -import test.Ice.proxy.AMD.Test.MyDerivedClass; +import test.Ice.proxy.AMD.Test._MyDerivedClassDisp; -public final class AMDMyDerivedClassI extends MyDerivedClass +public final class AMDMyDerivedClassI extends _MyDerivedClassDisp { public AMDMyDerivedClassI() diff --git a/java-compat/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java b/java-compat/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java index ed8036499b0..1e4baccbc5c 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java +++ b/java-compat/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java @@ -8,9 +8,9 @@ // ********************************************************************** package test.Ice.proxy; -import test.Ice.proxy.Test.MyDerivedClass; +import test.Ice.proxy.Test._MyDerivedClassDisp; -public final class MyDerivedClassI extends MyDerivedClass +public final class MyDerivedClassI extends _MyDerivedClassDisp { public MyDerivedClassI() diff --git a/java-compat/test/src/main/java/test/Ice/proxy/Test.ice b/java-compat/test/src/main/java/test/Ice/proxy/Test.ice index b902f6868d7..9e2239674b2 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/proxy/Test.ice @@ -15,14 +15,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/java-compat/test/src/main/java/test/Ice/proxy/TestAMD.ice b/java-compat/test/src/main/java/test/Ice/proxy/TestAMD.ice index 1cda6a8c5f9..7b1bbb70559 100644 --- a/java-compat/test/src/main/java/test/Ice/proxy/TestAMD.ice +++ b/java-compat/test/src/main/java/test/Ice/proxy/TestAMD.ice @@ -15,14 +15,14 @@ module Test { -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); Ice::Context getContext(); }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/java-compat/test/src/main/java/test/Ice/seqMapping/AMDMyClassI.java b/java-compat/test/src/main/java/test/Ice/seqMapping/AMDMyClassI.java index 7f5ea811728..22db08eb06b 100644 --- a/java-compat/test/src/main/java/test/Ice/seqMapping/AMDMyClassI.java +++ b/java-compat/test/src/main/java/test/Ice/seqMapping/AMDMyClassI.java @@ -12,7 +12,7 @@ package test.Ice.seqMapping; import test.Ice.seqMapping.AMD.Test.*; import test.Ice.seqMapping.Serialize.*; -public final class AMDMyClassI extends MyClass +public final class AMDMyClassI extends _MyClassDisp { @Override public void diff --git a/java-compat/test/src/main/java/test/Ice/seqMapping/MyClassI.java b/java-compat/test/src/main/java/test/Ice/seqMapping/MyClassI.java index ced4817bdb5..6e086cd532f 100644 --- a/java-compat/test/src/main/java/test/Ice/seqMapping/MyClassI.java +++ b/java-compat/test/src/main/java/test/Ice/seqMapping/MyClassI.java @@ -12,7 +12,7 @@ package test.Ice.seqMapping; import test.Ice.seqMapping.Test.*; import test.Ice.seqMapping.Serialize.*; -public final class MyClassI extends MyClass +public final class MyClassI extends _MyClassDisp { @Override public void diff --git a/java-compat/test/src/main/java/test/Ice/seqMapping/Test.ice b/java-compat/test/src/main/java/test/Ice/seqMapping/Test.ice index df46b2e5d47..2946052e37a 100644 --- a/java-compat/test/src/main/java/test/Ice/seqMapping/Test.ice +++ b/java-compat/test/src/main/java/test/Ice/seqMapping/Test.ice @@ -17,7 +17,7 @@ module Test ["java:serializable:test.Ice.seqMapping.Serialize.Large"] sequence<byte> SerialLarge; ["java:serializable:test.Ice.seqMapping.Serialize.Struct"] sequence<byte> SerialStruct; -class MyClass +interface MyClass { void shutdown(); diff --git a/java-compat/test/src/main/java/test/Ice/seqMapping/TestAMD.ice b/java-compat/test/src/main/java/test/Ice/seqMapping/TestAMD.ice index f01c1f80e18..3c94895b5c9 100644 --- a/java-compat/test/src/main/java/test/Ice/seqMapping/TestAMD.ice +++ b/java-compat/test/src/main/java/test/Ice/seqMapping/TestAMD.ice @@ -17,7 +17,7 @@ module Test ["java:serializable:test.Ice.seqMapping.Serialize.Large"] sequence<byte> SerialLarge; ["java:serializable:test.Ice.seqMapping.Serialize.Struct"] sequence<byte> SerialStruct; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); diff --git a/java-compat/test/src/main/java/test/Slice/escape/Client.java b/java-compat/test/src/main/java/test/Slice/escape/Client.java index 380d82025ac..28384cdb397 100644 --- a/java-compat/test/src/main/java/test/Slice/escape/Client.java +++ b/java-compat/test/src/main/java/test/Slice/escape/Client.java @@ -68,12 +68,6 @@ public class Client elseI() { } - - @Override - public void - foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current current) - { - } } static public class newI implements _new @@ -114,12 +108,6 @@ public class Client _do(Ice.Current current) { } - - @Override - public void - foo(defaultPrx _equals, Ice.IntHolder _final, Ice.Current current) - { - } } // @@ -141,6 +129,9 @@ public class Client _default d1 = new defaultI(); elsePrx e; _else e1 = new elseI(); + e1._if = 0; + e1._equals = null; + e1._final = 0; finalizePrx f = null; f._checkedCast(0, new Ice.IntHolder()); f._do(); diff --git a/java-compat/test/src/main/java/test/Slice/escape/Key.ice b/java-compat/test/src/main/java/test/Slice/escape/Key.ice index 9548461f36d..c74b7a4c2c8 100644 --- a/java-compat/test/src/main/java/test/Slice/escape/Key.ice +++ b/java-compat/test/src/main/java/test/Slice/escape/Key.ice @@ -36,7 +36,8 @@ interface default class else { int if; - void foo(default* equals, out int final); + default* equals; + int final; }; class finalize extends else implements default, catch diff --git a/java/test/src/main/java/test/Ice/checksum/TestServer.ice b/java/test/src/main/java/test/Ice/checksum/TestServer.ice index d13c1dd0c8d..d3b6bee9745 100644 --- a/java/test/src/main/java/test/Ice/checksum/TestServer.ice +++ b/java/test/src/main/java/test/Ice/checksum/TestServer.ice @@ -11,7 +11,8 @@ #include <Ice/SliceChecksumDict.ice> -[["java:package:test.Ice.checksum.server"]] +[["java:package:test.Ice.checksum.server"]] // For classes with operations + module Test { diff --git a/java/test/src/main/java/test/Ice/checksum/Types.ice b/java/test/src/main/java/test/Ice/checksum/Types.ice index 89c9eee01d3..95f5afc7728 100644 --- a/java/test/src/main/java/test/Ice/checksum/Types.ice +++ b/java/test/src/main/java/test/Ice/checksum/Types.ice @@ -379,7 +379,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -388,7 +388,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -397,7 +397,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -406,7 +406,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -415,7 +415,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -424,7 +424,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -433,7 +433,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -442,34 +442,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class -// -class BaseClass9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -480,8 +462,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -496,8 +477,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -551,53 +531,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/java/test/src/main/java/test/Ice/checksum/TypesServer.ice b/java/test/src/main/java/test/Ice/checksum/TypesServer.ice index 0774d423249..422f7f0ebc4 100644 --- a/java/test/src/main/java/test/Ice/checksum/TypesServer.ice +++ b/java/test/src/main/java/test/Ice/checksum/TypesServer.ice @@ -10,6 +10,8 @@ #pragma once [["java:package:test.Ice.checksum.server"]] +[["suppress-warning:deprecated"]] + module Test { @@ -376,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -385,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { int baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -394,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(Object o); void baseOp2(int i, out string s) throws Exception1; @@ -403,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1, Exception2; @@ -412,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, string s) throws Exception1; @@ -421,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(out string s) throws Exception1; @@ -430,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s); @@ -439,7 +441,7 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp2(int i, out string s) throws Exception1; }; @@ -447,25 +449,7 @@ class BaseClass8 // // TEST: Add base class // -class BaseClass9 extends EmptyClass1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 implements Interface1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface -// -class BaseClass11 extends EmptyClass1 implements Interface1 +interface BaseInterface9 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -476,8 +460,7 @@ class BaseClass11 extends EmptyClass1 implements Interface1 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -492,8 +475,7 @@ class Derived1 extends Compact1 // class Compact2(3) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -548,53 +530,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { int op(); }; diff --git a/java/test/src/main/java/test/Ice/classLoader/AbstractClassI.java b/java/test/src/main/java/test/Ice/classLoader/AbstractClassI.java deleted file mode 100644 index 3ca0b3aa5d1..00000000000 --- a/java/test/src/main/java/test/Ice/classLoader/AbstractClassI.java +++ /dev/null @@ -1,16 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package test.Ice.classLoader; - -import test.Ice.classLoader.Test.AbstractClass; - -class AbstractClassI extends AbstractClass -{ -} diff --git a/java/test/src/main/java/test/Ice/classLoader/AllTests.java b/java/test/src/main/java/test/Ice/classLoader/AllTests.java index 798ca80049c..f8e34fe5920 100644 --- a/java/test/src/main/java/test/Ice/classLoader/AllTests.java +++ b/java/test/src/main/java/test/Ice/classLoader/AllTests.java @@ -11,7 +11,6 @@ package test.Ice.classLoader; import java.io.PrintWriter; -import test.Ice.classLoader.Test.AbstractClass; import test.Ice.classLoader.Test.ConcreteClass; import test.Ice.classLoader.Test.E; import test.Ice.classLoader.Test.InitialPrx; @@ -19,21 +18,6 @@ import test.Util.Application; public class AllTests { - private static class MyValueFactory implements com.zeroc.Ice.ValueFactory - { - @Override - public com.zeroc.Ice.Value create(String type) - { - if(type.equals("::Test::AbstractClass")) - { - return new AbstractClassI(); - } - - assert (false); // Should never be reached - return null; - } - } - private static class MyClassLoader extends ClassLoader { MyClassLoader(ClassLoader parent) @@ -160,36 +144,6 @@ public class AllTests } // - // Verify that the class loader is invoked when a factory is not installed, and is - // not invoked when a factory is installed. - // - { - out.print("testing abstract class... "); - out.flush(); - - try - { - initial.getAbstractClass(); - } - catch(com.zeroc.Ice.NoValueFactoryException ex) - { - // Expected. - } - test(classLoader.check("Test.AbstractClass")); - test(classLoader.check("test.Ice.classLoader.Test.AbstractClass")); - classLoader.reset(); - - ic.getValueFactoryManager().add(new MyValueFactory(), "::Test::AbstractClass"); - AbstractClass ac = initial.getAbstractClass(); - test(ac != null); - test(!classLoader.check("Test.AbstractClass")); - test(!classLoader.check("test.Ice.classLoader.Test.AbstractClass")); - classLoader.reset(); - - out.println("ok"); - } - - // // Verify that the class loader is used for user exceptions. // out.print("testing user exception... "); diff --git a/java/test/src/main/java/test/Ice/classLoader/InitialI.java b/java/test/src/main/java/test/Ice/classLoader/InitialI.java index 5b3c5cd673d..22624576e83 100644 --- a/java/test/src/main/java/test/Ice/classLoader/InitialI.java +++ b/java/test/src/main/java/test/Ice/classLoader/InitialI.java @@ -9,7 +9,6 @@ package test.Ice.classLoader; -import test.Ice.classLoader.Test.AbstractClass; import test.Ice.classLoader.Test.ConcreteClass; import test.Ice.classLoader.Test.E; import test.Ice.classLoader.Test.Initial; @@ -28,12 +27,6 @@ public final class InitialI implements Initial } @Override - public AbstractClass getAbstractClass(com.zeroc.Ice.Current current) - { - return new AbstractClassI(); - } - - @Override public void throwException(com.zeroc.Ice.Current current) throws E { diff --git a/java/test/src/main/java/test/Ice/classLoader/Test.ice b/java/test/src/main/java/test/Ice/classLoader/Test.ice index 551c600020f..bea748d939c 100644 --- a/java/test/src/main/java/test/Ice/classLoader/Test.ice +++ b/java/test/src/main/java/test/Ice/classLoader/Test.ice @@ -18,17 +18,11 @@ class ConcreteClass int i; }; -class AbstractClass -{ - void op(); -}; - exception E {}; interface Initial { ConcreteClass getConcreteClass(); - AbstractClass getAbstractClass(); void throwException() throws E; void shutdown(); }; diff --git a/java/test/src/main/java/test/Ice/custom/Test.ice b/java/test/src/main/java/test/Ice/custom/Test.ice index 1320a119948..2af61072832 100644 --- a/java/test/src/main/java/test/Ice/custom/Test.ice +++ b/java/test/src/main/java/test/Ice/custom/Test.ice @@ -51,7 +51,7 @@ dictionary<int, string> D; ["java:type:java.util.LinkedList<java.util.List<String>>"] sequence<StringSeq> StringSeqSeq; -class TestIntf +interface TestIntf { CSeq opCSeq(CSeq inSeq, out CSeq outSeq); CArray opCArray(CArray inSeq, out CArray outSeq); @@ -100,8 +100,6 @@ class TestIntf optional(1) DoubleBuffer opOptDoubleBufferSeq(optional(2) DoubleBuffer inSeq, out optional(3) DoubleBuffer outSeq); void shutdown(); - - ["java:type:java.util.ArrayList<C>"] CSeq seq; }; }; diff --git a/java/test/src/main/java/test/Ice/custom/TestI.java b/java/test/src/main/java/test/Ice/custom/TestI.java index 33129d6e8f6..47e7a2af54c 100644 --- a/java/test/src/main/java/test/Ice/custom/TestI.java +++ b/java/test/src/main/java/test/Ice/custom/TestI.java @@ -24,9 +24,8 @@ import test.Ice.custom.Test.C; import test.Ice.custom.Test.E; import test.Ice.custom.Test.S; import test.Ice.custom.Test.TestIntf; -import test.Ice.custom.Test._TestIntfDisp; -public final class TestI implements _TestIntfDisp +public final class TestI implements TestIntf { public TestI(com.zeroc.Ice.Communicator communicator) { diff --git a/java/test/src/main/java/test/Ice/defaultValue/Test.ice b/java/test/src/main/java/test/Ice/defaultValue/Test.ice index 4e0281ef5df..789487e0500 100644 --- a/java/test/src/main/java/test/Ice/defaultValue/Test.ice +++ b/java/test/src/main/java/test/Ice/defaultValue/Test.ice @@ -10,6 +10,9 @@ #pragma once [["java:package:test.Ice.defaultValue"]] + +[["suppress-warning:deprecated"]] // For enumerator references + module Test { diff --git a/java/test/src/main/java/test/Ice/inheritance/Test.ice b/java/test/src/main/java/test/Ice/inheritance/Test.ice index 83f212381cb..f48ff12cc93 100644 --- a/java/test/src/main/java/test/Ice/inheritance/Test.ice +++ b/java/test/src/main/java/test/Ice/inheritance/Test.ice @@ -10,6 +10,8 @@ #pragma once [["java:package:test.Ice.inheritance"]] +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/java/test/src/main/java/test/Ice/invoke/Test.ice b/java/test/src/main/java/test/Ice/invoke/Test.ice index aca42de1940..145b9dc0da3 100644 --- a/java/test/src/main/java/test/Ice/invoke/Test.ice +++ b/java/test/src/main/java/test/Ice/invoke/Test.ice @@ -17,7 +17,7 @@ exception MyException { }; -class MyClass +interface MyClass { void opOneway(); diff --git a/java/test/src/main/java/test/Ice/objects/Test.ice b/java/test/src/main/java/test/Ice/objects/Test.ice index 6172f7f3323..d7ba9284d6c 100644 --- a/java/test/src/main/java/test/Ice/objects/Test.ice +++ b/java/test/src/main/java/test/Ice/objects/Test.ice @@ -10,6 +10,8 @@ #pragma once [["java:package:test.Ice.objects"]] +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/java/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java b/java/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java index 0f248a00cde..ca4dc34187e 100644 --- a/java/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java +++ b/java/test/src/main/java/test/Ice/operations/AMDMyDerivedClassI.java @@ -17,7 +17,7 @@ import com.zeroc.Ice.Current; import test.Ice.operations.AMD.Test.*; -public final class AMDMyDerivedClassI implements _MyDerivedClassDisp +public final class AMDMyDerivedClassI implements MyDerivedClass { private static void test(boolean b) { @@ -51,28 +51,28 @@ public final class AMDMyDerivedClassI implements _MyDerivedClassDisp public boolean ice_isA(String id, Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_isA(id, current); + return MyDerivedClass.super.ice_isA(id, current); } @Override public void ice_ping(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - _MyDerivedClassDisp.super.ice_ping(current); + MyDerivedClass.super.ice_ping(current); } @Override public String[] ice_ids(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_ids(current); + return MyDerivedClass.super.ice_ids(current); } @Override public String ice_id(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_id(current); + return MyDerivedClass.super.ice_id(current); } @Override diff --git a/java/test/src/main/java/test/Ice/operations/MyDerivedClassI.java b/java/test/src/main/java/test/Ice/operations/MyDerivedClassI.java index c43096f303d..cf9fffe4114 100644 --- a/java/test/src/main/java/test/Ice/operations/MyDerivedClassI.java +++ b/java/test/src/main/java/test/Ice/operations/MyDerivedClassI.java @@ -15,7 +15,7 @@ import com.zeroc.Ice.Current; import test.Ice.operations.Test.*; -public final class MyDerivedClassI implements _MyDerivedClassDisp +public final class MyDerivedClassI implements MyDerivedClass { private static void test(boolean b) { @@ -33,28 +33,28 @@ public final class MyDerivedClassI implements _MyDerivedClassDisp public boolean ice_isA(String id, Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_isA(id, current); + return MyDerivedClass.super.ice_isA(id, current); } @Override public void ice_ping(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - _MyDerivedClassDisp.super.ice_ping(current); + MyDerivedClass.super.ice_ping(current); } @Override public String[] ice_ids(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_ids(current); + return MyDerivedClass.super.ice_ids(current); } @Override public String ice_id(Current current) { test(current.mode == com.zeroc.Ice.OperationMode.Nonmutating); - return _MyDerivedClassDisp.super.ice_id(current); + return MyDerivedClass.super.ice_id(current); } @Override diff --git a/java/test/src/main/java/test/Ice/operations/Test.ice b/java/test/src/main/java/test/Ice/operations/Test.ice index 6571e3004cd..28fd288896b 100644 --- a/java/test/src/main/java/test/Ice/operations/Test.ice +++ b/java/test/src/main/java/test/Ice/operations/Test.ice @@ -22,7 +22,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -92,7 +92,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -276,7 +276,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/java/test/src/main/java/test/Ice/operations/TestAMD.ice b/java/test/src/main/java/test/Ice/operations/TestAMD.ice index 4776139c314..8670ea15e7e 100644 --- a/java/test/src/main/java/test/Ice/operations/TestAMD.ice +++ b/java/test/src/main/java/test/Ice/operations/TestAMD.ice @@ -22,7 +22,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -92,7 +92,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); @@ -276,7 +276,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/java/test/src/main/java/test/Ice/optional/AMDInitialI.java b/java/test/src/main/java/test/Ice/optional/AMDInitialI.java index f472ee519dd..fb81faff5cb 100644 --- a/java/test/src/main/java/test/Ice/optional/AMDInitialI.java +++ b/java/test/src/main/java/test/Ice/optional/AMDInitialI.java @@ -20,7 +20,7 @@ import com.zeroc.Ice.Current; import test.Ice.optional.AMD.Test.*; -public final class AMDInitialI implements _InitialDisp +public final class AMDInitialI implements Initial { @Override public CompletionStage<Void> shutdownAsync(Current current) diff --git a/java/test/src/main/java/test/Ice/optional/InitialI.java b/java/test/src/main/java/test/Ice/optional/InitialI.java index c19482b80ed..8609b888200 100644 --- a/java/test/src/main/java/test/Ice/optional/InitialI.java +++ b/java/test/src/main/java/test/Ice/optional/InitialI.java @@ -18,7 +18,7 @@ import com.zeroc.Ice.Current; import test.Ice.optional.Test.*; -public final class InitialI implements _InitialDisp +public final class InitialI implements Initial { @Override public void shutdown(Current current) diff --git a/java/test/src/main/java/test/Ice/optional/Test.ice b/java/test/src/main/java/test/Ice/optional/Test.ice index debb2a28680..74206f58e3d 100644 --- a/java/test/src/main/java/test/Ice/optional/Test.ice +++ b/java/test/src/main/java/test/Ice/optional/Test.ice @@ -197,7 +197,7 @@ class Recursive { optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/java/test/src/main/java/test/Ice/optional/TestAMD.ice b/java/test/src/main/java/test/Ice/optional/TestAMD.ice index b9993895e02..c9678bfa956 100644 --- a/java/test/src/main/java/test/Ice/optional/TestAMD.ice +++ b/java/test/src/main/java/test/Ice/optional/TestAMD.ice @@ -198,7 +198,7 @@ class Recursive { }; ["amd"] -class Initial +interface Initial { void shutdown(); diff --git a/java/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java b/java/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java index d54a52e8ace..8477e02bf6a 100644 --- a/java/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java +++ b/java/test/src/main/java/test/Ice/proxy/AMDMyDerivedClassI.java @@ -12,9 +12,9 @@ package test.Ice.proxy; import java.util.concurrent.CompletionStage; import java.util.concurrent.CompletableFuture; -import test.Ice.proxy.AMD.Test._MyDerivedClassDisp; +import test.Ice.proxy.AMD.Test.MyDerivedClass; -public final class AMDMyDerivedClassI implements _MyDerivedClassDisp +public final class AMDMyDerivedClassI implements MyDerivedClass { public AMDMyDerivedClassI() { @@ -44,7 +44,7 @@ public final class AMDMyDerivedClassI implements _MyDerivedClassDisp public boolean ice_isA(String s, com.zeroc.Ice.Current current) { _ctx = current.ctx; - return _MyDerivedClassDisp.super.ice_isA(s, current); + return MyDerivedClass.super.ice_isA(s, current); } private java.util.Map<String, String> _ctx; diff --git a/java/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java b/java/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java index 687ec11fffa..ae9518057bd 100644 --- a/java/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java +++ b/java/test/src/main/java/test/Ice/proxy/MyDerivedClassI.java @@ -9,9 +9,9 @@ package test.Ice.proxy; -import test.Ice.proxy.Test._MyDerivedClassDisp; +import test.Ice.proxy.Test.MyDerivedClass; -public final class MyDerivedClassI implements _MyDerivedClassDisp +public final class MyDerivedClassI implements MyDerivedClass { public MyDerivedClassI() { @@ -39,7 +39,7 @@ public final class MyDerivedClassI implements _MyDerivedClassDisp public boolean ice_isA(String s, com.zeroc.Ice.Current current) { _ctx = current.ctx; - return _MyDerivedClassDisp.super.ice_isA(s, current); + return MyDerivedClass.super.ice_isA(s, current); } private java.util.Map<String, String> _ctx; diff --git a/java/test/src/main/java/test/Ice/proxy/Test.ice b/java/test/src/main/java/test/Ice/proxy/Test.ice index b902f6868d7..9e2239674b2 100644 --- a/java/test/src/main/java/test/Ice/proxy/Test.ice +++ b/java/test/src/main/java/test/Ice/proxy/Test.ice @@ -15,14 +15,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/java/test/src/main/java/test/Ice/proxy/TestAMD.ice b/java/test/src/main/java/test/Ice/proxy/TestAMD.ice index 1cda6a8c5f9..7b1bbb70559 100644 --- a/java/test/src/main/java/test/Ice/proxy/TestAMD.ice +++ b/java/test/src/main/java/test/Ice/proxy/TestAMD.ice @@ -15,14 +15,14 @@ module Test { -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); Ice::Context getContext(); }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/java/test/src/main/java/test/Slice/escape/Client.java b/java/test/src/main/java/test/Slice/escape/Client.java index bd39c85b7f6..11e4d968278 100644 --- a/java/test/src/main/java/test/Slice/escape/Client.java +++ b/java/test/src/main/java/test/Slice/escape/Client.java @@ -13,7 +13,6 @@ import test.Slice.escape._abstract._break; import test.Slice.escape._abstract._catch; import test.Slice.escape._abstract._default; import test.Slice.escape._abstract._else; -import test.Slice.escape._abstract._elseDisp; import test.Slice.escape._abstract._finalize; import test.Slice.escape._abstract._finalizeDisp; import test.Slice.escape._abstract._hashCode; @@ -22,7 +21,6 @@ import test.Slice.escape._abstract._new; import test.Slice.escape._abstract._switch; import test.Slice.escape._abstract.catchPrx; import test.Slice.escape._abstract.defaultPrx; -import test.Slice.escape._abstract.elsePrx; import test.Slice.escape._abstract.finalizePrx; public class Client @@ -61,15 +59,6 @@ public class Client } } - static public class elseServantI implements _elseDisp - { - @Override - public int foo(defaultPrx _equals, com.zeroc.Ice.Current current) - { - return 0; - } - } - static public class newI implements _new { public newI() @@ -78,7 +67,7 @@ public class Client @Override public _assert _notify(_break _notifyAll, _else _null, _finalize _package, - elsePrx _private, finalizePrx _protected, + com.zeroc.Ice.ObjectPrx _private, finalizePrx _protected, catchPrx _public, defaultPrx _return, int _static, int _strictfp, int _super) throws _hashCode, _import { @@ -106,12 +95,6 @@ public class Client public void _do(com.zeroc.Ice.Current current) { } - - @Override - public int foo(defaultPrx _equals, com.zeroc.Ice.Current current) - { - return 0; - } } // @@ -130,8 +113,11 @@ public class Client defaultPrx d = null; d._do(); _default d1 = new defaultI(); - elsePrx e; _else e1 = new elseI(); + e1._if = 0; + e1._equals = null; + e1._final = 0; + finalizePrx f = null; f._checkedCast(0); f._do(); diff --git a/java/test/src/main/java/test/Slice/escape/Key.ice b/java/test/src/main/java/test/Slice/escape/Key.ice index c734177fe3d..376f1511fd7 100644 --- a/java/test/src/main/java/test/Slice/escape/Key.ice +++ b/java/test/src/main/java/test/Slice/escape/Key.ice @@ -36,7 +36,8 @@ interface default class else { int if; - void foo(default* equals, out int final); + default* equals; + int final; }; class finalize extends else implements default, catch diff --git a/js/test/Ice/inheritance/Test.ice b/js/test/Ice/inheritance/Test.ice index 7be1091796e..bb53e844497 100644 --- a/js/test/Ice/inheritance/Test.ice +++ b/js/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/js/test/Ice/objects/Test.ice b/js/test/Ice/objects/Test.ice index 453243b41bf..db45ea6c3ba 100644 --- a/js/test/Ice/objects/Test.ice +++ b/js/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -67,16 +69,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I diff --git a/js/test/Ice/operations/Test.ice b/js/test/Ice/operations/Test.ice index 81caced8a0a..7b202f964f7 100644 --- a/js/test/Ice/operations/Test.ice +++ b/js/test/Ice/operations/Test.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -91,7 +91,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -273,7 +273,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/js/test/Ice/operations/Twoways.js b/js/test/Ice/operations/Twoways.js index 69ef80fc852..7ec199ae834 100644 --- a/js/test/Ice/operations/Twoways.js +++ b/js/test/Ice/operations/Twoways.js @@ -124,7 +124,7 @@ return prx.ice_ping(); } - ).then(() => prx.ice_isA(Test.MyClass.ice_staticId()) + ).then(() => prx.ice_isA(Test._MyClassDisp.ice_staticId()) ).then(b => { test(b); @@ -132,7 +132,7 @@ } ).then(id => { - test(id === Test.MyDerivedClass.ice_staticId()); + test(id === Test._MyDerivedClassDisp.ice_staticId()); return prx.ice_ids(); } ).then(ids => diff --git a/js/test/Ice/optional/ClientPrivate.ice b/js/test/Ice/optional/ClientPrivate.ice index 5dd08613b9a..90fc4c253ea 100644 --- a/js/test/Ice/optional/ClientPrivate.ice +++ b/js/test/Ice/optional/ClientPrivate.ice @@ -29,7 +29,7 @@ class D extends B // on the server and pass an optional argument. This isn't necessary in other language // mappings where the public stream API is available. // -class Initial2 +interface Initial2 { void opClassAndUnknownOptional(A p, optional(1) Object o); diff --git a/js/test/Ice/optional/Test.ice b/js/test/Ice/optional/Test.ice index 1822644faad..2c26080f792 100644 --- a/js/test/Ice/optional/Test.ice +++ b/js/test/Ice/optional/Test.ice @@ -189,7 +189,7 @@ class G G1 gg1; }; -class Initial +interface Initial { void shutdown(); diff --git a/js/test/Ice/proxy/Test.ice b/js/test/Ice/proxy/Test.ice index 239c473918a..46912931594 100644 --- a/js/test/Ice/proxy/Test.ice +++ b/js/test/Ice/proxy/Test.ice @@ -14,14 +14,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/objective-c/test/Ice/inheritance/InheritanceTest.ice b/objective-c/test/Ice/inheritance/InheritanceTest.ice index d89d9d534f0..39ac02398fe 100644 --- a/objective-c/test/Ice/inheritance/InheritanceTest.ice +++ b/objective-c/test/Ice/inheritance/InheritanceTest.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + ["objc:prefix:TestInheritance"] module Test { diff --git a/objective-c/test/Ice/invoke/InvokeTest.ice b/objective-c/test/Ice/invoke/InvokeTest.ice index 13168b41d51..6b35d282d86 100644 --- a/objective-c/test/Ice/invoke/InvokeTest.ice +++ b/objective-c/test/Ice/invoke/InvokeTest.ice @@ -17,7 +17,7 @@ exception MyException { }; -class MyClass +interface MyClass { void opOneway(); diff --git a/objective-c/test/Ice/objects/AllTests.m b/objective-c/test/Ice/objects/AllTests.m index 8cfca43f224..14c72cecb69 100644 --- a/objective-c/test/Ice/objects/AllTests.m +++ b/objective-c/test/Ice/objects/AllTests.m @@ -218,10 +218,13 @@ objectsAllTests(id<ICECommunicator> communicator, BOOL collocated) tprintf("testing protected members... "); TestObjectsE* e = [initial getE]; - test([(id<TestObjectsE>)e checkValues:nil]); + + test(e.i == 1); + test([e.s isEqualToString:@"hello"]); + TestObjectsF* f = [initial getF]; - test([(id<TestObjectsF>)f checkValues:nil]); - test([(id<TestObjectsE>)f.e2 checkValues:nil]); + test(f.e1 && f.e1 == f.e2); + test(f.e1.i == 1 && [e.s isEqualToString:@"hello"]); tprintf("ok\n"); tprintf("getting I, J and H... "); diff --git a/objective-c/test/Ice/objects/ObjectsTest.ice b/objective-c/test/Ice/objects/ObjectsTest.ice index 6c5aa1c4008..bffe87316c8 100644 --- a/objective-c/test/Ice/objects/ObjectsTest.ice +++ b/objective-c/test/Ice/objects/ObjectsTest.ice @@ -9,7 +9,10 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + ["objc:prefix:TestObjects"] + module Test { @@ -74,16 +77,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I diff --git a/objective-c/test/Ice/objects/TestI.m b/objective-c/test/Ice/objects/TestI.m index a50eae7c2d2..9d07f6f6d81 100644 --- a/objective-c/test/Ice/objects/TestI.m +++ b/objective-c/test/Ice/objects/TestI.m @@ -50,10 +50,7 @@ { return [super init:1 s:@"hello"]; } --(BOOL) checkValues:(ICECurrent*)current -{ - return i == 1 && [s isEqualToString:@"hello"]; -} + @end @implementation TestObjectsFI diff --git a/objective-c/test/Ice/operations/OperationsTest.ice b/objective-c/test/Ice/operations/OperationsTest.ice index 03012896e6e..e6c10fbdc5c 100644 --- a/objective-c/test/Ice/operations/OperationsTest.ice +++ b/objective-c/test/Ice/operations/OperationsTest.ice @@ -22,7 +22,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -115,7 +115,7 @@ class A // Used Objective-C test only. sequence<A> AS; // Used by Objective-C test only. -class MyClass +interface MyClass { void shutdown(); @@ -319,7 +319,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 c); diff --git a/objective-c/test/Ice/optional/OptionalTest.ice b/objective-c/test/Ice/optional/OptionalTest.ice index 7528f766fc0..fa9db3bb8e2 100644 --- a/objective-c/test/Ice/optional/OptionalTest.ice +++ b/objective-c/test/Ice/optional/OptionalTest.ice @@ -195,11 +195,12 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/objective-c/test/Ice/proxy/ProxyTest.ice b/objective-c/test/Ice/proxy/ProxyTest.ice index ac17dcbc0f2..57796e47cfc 100644 --- a/objective-c/test/Ice/proxy/ProxyTest.ice +++ b/objective-c/test/Ice/proxy/ProxyTest.ice @@ -15,14 +15,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/objective-c/test/Slice/escape/Client.m b/objective-c/test/Slice/escape/Client.m index 07b9055cd9f..b856fae8937 100644 --- a/objective-c/test/Slice/escape/Client.m +++ b/objective-c/test/Slice/escape/Client.m @@ -66,7 +66,6 @@ testSymbols() test(cl2 == 0); andswitch* cl3 = 0; - test(cl3.if_ == 0); test(cl3 == 0); anddo* cl4 = 0; diff --git a/objective-c/test/Slice/escape/Key.ice b/objective-c/test/Slice/escape/Key.ice index 1ca6f9cb59d..06e2fa733a2 100644 --- a/objective-c/test/Slice/escape/Key.ice +++ b/objective-c/test/Slice/escape/Key.ice @@ -35,16 +35,16 @@ interface char void explicit(); }; -class switch +interface switch { - int if; void foo(char* export, out int volatile); void foo2(char* export, ["objc:param:y"] int YES, out ["objc:param:nil2"] int nil); void foo3(char* export, out int nil); }; -class do extends switch implements char, break +class do implements char, break, switch { + int if; }; sequence<auto> extern; diff --git a/php/test/Ice/checksum/CTypes.ice b/php/test/Ice/checksum/CTypes.ice index 66014750174..348df3b0965 100644 --- a/php/test/Ice/checksum/CTypes.ice +++ b/php/test/Ice/checksum/CTypes.ice @@ -378,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -387,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -396,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -405,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -414,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -423,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -432,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -441,7 +441,7 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -450,7 +450,7 @@ class BaseClass8 // // TEST: Add base class // -class BaseClass9 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -459,7 +459,7 @@ class BaseClass9 // // TEST: Add interface // -class BaseClass10 +interface BaseInterface10 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -468,7 +468,7 @@ class BaseClass10 // // TEST: Add base class and interface // -class BaseClass11 +interface BaseInterface11 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -479,8 +479,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -495,8 +494,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -550,53 +548,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/php/test/Ice/inheritance/Test.ice b/php/test/Ice/inheritance/Test.ice index 2e9b176c00b..28faa3b8c9e 100644 --- a/php/test/Ice/inheritance/Test.ice +++ b/php/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/php/test/Ice/objects/Test.ice b/php/test/Ice/objects/Test.ice index 11acace6c9a..bc10794cfea 100644 --- a/php/test/Ice/objects/Test.ice +++ b/php/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -67,16 +69,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I @@ -134,7 +132,7 @@ exception EDerived extends EBase A1 a4; }; -class Initial +interface Initial { void shutdown(); B getB1(); diff --git a/php/test/Ice/operations/Client.php b/php/test/Ice/operations/Client.php index 73bed8c66fd..417eb4ea63f 100644 --- a/php/test/Ice/operations/Client.php +++ b/php/test/Ice/operations/Client.php @@ -38,9 +38,8 @@ function twoways($communicator, $p) $enum2 = $NS ? constant("Test\\MyEnum::enum2") : constant("Test_MyEnum::enum2"); $enum3 = $NS ? constant("Test\\MyEnum::enum3") : constant("Test_MyEnum::enum3"); + $myClassPrxHelper = $NS ? "Test\\MyClassPrxHelper" : "Test_MyClassPrxHelper"; $myDerivedClassPrxHelper = $NS ? "Test\\MyDerivedClassPrxHelper" : "Test_MyDerivedClassPrxHelper"; - $myDerivedClass = $NS ? "Test\\MyDerivedClass" : "Test_MyDerivedClass"; - $myClass = $NS ? "Test\\MyClass" : "Test_MyClass"; $objectPrxHelper = $NS ? "Ice\\ObjectPrxHelper" : "Ice_ObjectPrxHelper"; @@ -165,16 +164,15 @@ function twoways($communicator, $p) } { - test($myDerivedClassPrxHelper::ice_staticId() == $myDerivedClass::ice_staticId()); test($objectPrxHelper::ice_staticId() == "::Ice::Object"); } { - test($p->ice_isA($myClass::ice_staticId())); + test($p->ice_isA($myClassPrxHelper::ice_staticId())); } { - test($p->ice_id() == $myDerivedClass::ice_staticId()); + test($p->ice_id() == $myDerivedClassPrxHelper::ice_staticId()); } { diff --git a/php/test/Ice/operations/Test.ice b/php/test/Ice/operations/Test.ice index 33988c55884..f18de63f4fc 100644 --- a/php/test/Ice/operations/Test.ice +++ b/php/test/Ice/operations/Test.ice @@ -19,7 +19,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -79,7 +79,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -253,7 +253,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyStruct1 opMyStruct1(MyStruct1 s); diff --git a/php/test/Ice/optional/ClientPrivate.ice b/php/test/Ice/optional/ClientPrivate.ice index 5dd08613b9a..90fc4c253ea 100644 --- a/php/test/Ice/optional/ClientPrivate.ice +++ b/php/test/Ice/optional/ClientPrivate.ice @@ -29,7 +29,7 @@ class D extends B // on the server and pass an optional argument. This isn't necessary in other language // mappings where the public stream API is available. // -class Initial2 +interface Initial2 { void opClassAndUnknownOptional(A p, optional(1) Object o); diff --git a/php/test/Ice/optional/Test.ice b/php/test/Ice/optional/Test.ice index c889c947b47..b975b418295 100644 --- a/php/test/Ice/optional/Test.ice +++ b/php/test/Ice/optional/Test.ice @@ -189,7 +189,7 @@ class G G1 gg1; }; -class Initial +interface Initial { void shutdown(); diff --git a/php/test/Ice/proxy/Client.php b/php/test/Ice/proxy/Client.php index 3ba626f1315..107d2e32841 100644 --- a/php/test/Ice/proxy/Client.php +++ b/php/test/Ice/proxy/Client.php @@ -54,15 +54,6 @@ function allTests($communicator) $modeASCII = $NS ? constant("Ice\\ToStringMode::ASCII") : constant("Ice_ToStringMode::ASCII"); $modeCompat = $NS ? constant("Ice\\ToStringMode::Compat") : constant("Ice_ToStringMode::Compat"); - if($NS) - { - echo "namespace ON\n"; - } - else - { - echo "namespace OFF\n"; - } - echo "testing stringToProxy... "; flush(); $ref = "test:default -p 12010"; diff --git a/php/test/Ice/proxy/Test.ice b/php/test/Ice/proxy/Test.ice index 5997418d1b4..6dd770eb98a 100644 --- a/php/test/Ice/proxy/Test.ice +++ b/php/test/Ice/proxy/Test.ice @@ -14,14 +14,14 @@ module Test dictionary<string, string> Context; -class MyClass +interface MyClass { void shutdown(); Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/php/test/Slice/escape/Client.php b/php/test/Slice/escape/Client.php index cfcc6074572..004995e90df 100644 --- a/php/test/Slice/escape/Client.php +++ b/php/test/Slice/escape/Client.php @@ -84,8 +84,6 @@ function allTests($communicator) eval("return and_functionPrxHelper::uncheckedCast(\$p);"); $d = $NS ? eval("return _and\\diePrxHelper::uncheckedCast(\$p);") : eval("return and_diePrxHelper::uncheckedCast(\$p);"); - $e = $NS ? eval("return _and\\echoPrxHelper::uncheckedCast(\$p);") : - eval("return and_echoPrxHelper::uncheckedCast(\$p);"); $e1 = new echoI(); $f = $NS ? eval("return _and\\enddeclarePrxHelper::uncheckedCast(\$p);") : eval("return and_enddeclarePrxHelper::uncheckedCast(\$p);"); diff --git a/php/test/Slice/escape/Key.ice b/php/test/Slice/escape/Key.ice index ab73e3fa8e2..c92e8758d43 100644 --- a/php/test/Slice/escape/Key.ice +++ b/php/test/Slice/escape/Key.ice @@ -15,6 +15,7 @@ module and { as }; + struct xor { int abstract; @@ -27,37 +28,51 @@ module and int use; int var; }; + interface break { void case(int catch, out int try); }; + interface function { void continue(int declare, int default); }; + interface die { void do(); }; + class echo { - int if; - void else(die* elseif, out int empty); + int if; + int else; + die* elseif; + int empty; }; + class enddeclare extends echo implements die, function { }; sequence<array> endfor; dictionary<string,array> endforeach; - exception endif { int endswitch; }; - exception endwhile extends endif { int eval; int exit; }; + exception endif + { + int endswitch; + }; + + exception endwhile extends endif + { + int eval; + int exit; + }; local interface for { array foreach(break if, echo global, enddeclare require, function* include, - die* return, echo* isset, enddeclare* list, int new, int static) - throws endif, endwhile; + die* return, echo* isset, enddeclare* list, int new, int static) throws endif, endwhile; }; const int or = 0; diff --git a/python/test/Ice/checksum/AllTests.py b/python/test/Ice/checksum/AllTests.py index 9bd5797cc52..c33703a511d 100644 --- a/python/test/Ice/checksum/AllTests.py +++ b/python/test/Ice/checksum/AllTests.py @@ -46,7 +46,6 @@ def allTests(communicator): m = patt.search(i) if m: n = int(i[m.start():]) - test(i in Ice.sliceChecksums) if n <= 1: diff --git a/python/test/Ice/checksum/CTypes.ice b/python/test/Ice/checksum/CTypes.ice index 66014750174..51a18734e96 100644 --- a/python/test/Ice/checksum/CTypes.ice +++ b/python/test/Ice/checksum/CTypes.ice @@ -378,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -387,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -396,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -405,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -414,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -423,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -432,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -441,34 +441,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class -// -class BaseClass9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -479,8 +461,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -495,8 +476,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -550,53 +530,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/python/test/Ice/checksum/STypes.ice b/python/test/Ice/checksum/STypes.ice index 76580049c9d..557c33b1664 100644 --- a/python/test/Ice/checksum/STypes.ice +++ b/python/test/Ice/checksum/STypes.ice @@ -375,7 +375,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -384,7 +384,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { int baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -393,7 +393,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(Object o); void baseOp2(int i, out string s) throws Exception1; @@ -402,7 +402,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1, Exception2; @@ -411,7 +411,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, string s) throws Exception1; @@ -420,7 +420,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(out string s) throws Exception1; @@ -429,7 +429,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s); @@ -438,7 +438,7 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp2(int i, out string s) throws Exception1; }; @@ -446,25 +446,7 @@ class BaseClass8 // // TEST: Add base class // -class BaseClass9 extends EmptyClass1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 implements Interface1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface -// -class BaseClass11 extends EmptyClass1 implements Interface1 +interface BaseInterface9 extends Interface1 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -475,8 +457,7 @@ class BaseClass11 extends EmptyClass1 implements Interface1 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -491,8 +472,7 @@ class Derived1 extends Compact1 // class Compact2(3) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -547,53 +527,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(2) string emailAddress, optional(1) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, string emailAddress, optional(1) string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { int op(); }; diff --git a/python/test/Ice/inheritance/Test.ice b/python/test/Ice/inheritance/Test.ice index 2e9b176c00b..28faa3b8c9e 100644 --- a/python/test/Ice/inheritance/Test.ice +++ b/python/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/python/test/Ice/objects/Test.ice b/python/test/Ice/objects/Test.ice index 88f2749852e..42f0a672cf2 100644 --- a/python/test/Ice/objects/Test.ice +++ b/python/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -67,16 +69,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I diff --git a/python/test/Ice/operations/OnewaysAMI.py b/python/test/Ice/operations/OnewaysAMI.py index 4c08b60f52f..cd14817af66 100644 --- a/python/test/Ice/operations/OnewaysAMI.py +++ b/python/test/Ice/operations/OnewaysAMI.py @@ -45,7 +45,7 @@ def onewaysAMI(communicator, proxy): cb.check() try: - p.begin_ice_isA(Test.MyClass.ice_staticId()) + p.begin_ice_isA(Test._MyClassDisp.ice_staticId()) test(False) except RuntimeError: pass diff --git a/python/test/Ice/operations/OnewaysFuture.py b/python/test/Ice/operations/OnewaysFuture.py index ea5e6f06b90..741425a0ef4 100644 --- a/python/test/Ice/operations/OnewaysFuture.py +++ b/python/test/Ice/operations/OnewaysFuture.py @@ -21,7 +21,7 @@ def onewaysFuture(communicator, proxy): f.sent() try: - p.ice_isAAsync(Test.MyClass.ice_staticId()) + p.ice_isAAsync(Test._MyClassDisp.ice_staticId()) test(False) except RuntimeError: pass diff --git a/python/test/Ice/operations/Test.ice b/python/test/Ice/operations/Test.ice index cfafa00107b..9861a06c775 100644 --- a/python/test/Ice/operations/Test.ice +++ b/python/test/Ice/operations/Test.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -91,7 +91,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -274,7 +274,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/python/test/Ice/operations/TestAMD.ice b/python/test/Ice/operations/TestAMD.ice index 31a3f98c5f9..c5e9f839784 100644 --- a/python/test/Ice/operations/TestAMD.ice +++ b/python/test/Ice/operations/TestAMD.ice @@ -19,7 +19,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -89,7 +89,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); @@ -272,7 +272,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/python/test/Ice/operations/Twoways.py b/python/test/Ice/operations/Twoways.py index 387b2758114..3ebeb9ffae8 100644 --- a/python/test/Ice/operations/Twoways.py +++ b/python/test/Ice/operations/Twoways.py @@ -103,7 +103,7 @@ def twoways(communicator, p): # # ice_isA # - test(p.ice_isA(Test.MyClass.ice_staticId())) + test(p.ice_isA(Test._MyClassDisp.ice_staticId())) # # ice_ids @@ -117,13 +117,13 @@ def twoways(communicator, p): # # ice_id # - test(p.ice_id() == Test.MyDerivedClass.ice_staticId()) + test(p.ice_id() == Test._MyDerivedClassDisp.ice_staticId()) # # Prx ice_staticId # - test(Test.MyClassPrx.ice_staticId() == Test.MyClass.ice_staticId()) - test(Test.MyDerivedClassPrx.ice_staticId() == Test.MyDerivedClass.ice_staticId()) + test(Test.MyClassPrx.ice_staticId() == Test._MyClassDisp.ice_staticId()) + test(Test.MyDerivedClassPrx.ice_staticId() == Test._MyDerivedClassDisp.ice_staticId()) test(Ice.ObjectPrx.ice_staticId() == Ice.Object.ice_staticId()) # diff --git a/python/test/Ice/operations/TwowaysAMI.py b/python/test/Ice/operations/TwowaysAMI.py index 867a78f6956..38f0b14905c 100644 --- a/python/test/Ice/operations/TwowaysAMI.py +++ b/python/test/Ice/operations/TwowaysAMI.py @@ -757,7 +757,7 @@ def twowaysAMI(communicator, p): cb.check() cb = Callback() - p.begin_ice_isA(Test.MyClass.ice_staticId(), cb.isA, cb.exCB) + p.begin_ice_isA(Test._MyClassDisp.ice_staticId(), cb.isA, cb.exCB) cb.check() cb = Callback() diff --git a/python/test/Ice/operations/TwowaysFuture.py b/python/test/Ice/operations/TwowaysFuture.py index b84926e9cdf..19b0bdaab6c 100644 --- a/python/test/Ice/operations/TwowaysFuture.py +++ b/python/test/Ice/operations/TwowaysFuture.py @@ -902,7 +902,7 @@ def twowaysFuture(communicator, p): f = p.ice_pingAsync() test(f.result() is None) - f = p.ice_isAAsync(Test.MyClass.ice_staticId()) + f = p.ice_isAAsync(Test._MyClassDisp.ice_staticId()) test(f.result()) f = p.ice_idAsync() diff --git a/python/test/Ice/optional/ClientPrivate.ice b/python/test/Ice/optional/ClientPrivate.ice index 5dd08613b9a..90fc4c253ea 100644 --- a/python/test/Ice/optional/ClientPrivate.ice +++ b/python/test/Ice/optional/ClientPrivate.ice @@ -29,7 +29,7 @@ class D extends B // on the server and pass an optional argument. This isn't necessary in other language // mappings where the public stream API is available. // -class Initial2 +interface Initial2 { void opClassAndUnknownOptional(A p, optional(1) Object o); diff --git a/python/test/Ice/optional/Test.ice b/python/test/Ice/optional/Test.ice index a4b05fe844a..d6983cd824b 100644 --- a/python/test/Ice/optional/Test.ice +++ b/python/test/Ice/optional/Test.ice @@ -196,7 +196,7 @@ class Recursive { optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/python/test/Ice/optional/TestAMD.ice b/python/test/Ice/optional/TestAMD.ice index 8f315c90d83..32bf61cdf86 100644 --- a/python/test/Ice/optional/TestAMD.ice +++ b/python/test/Ice/optional/TestAMD.ice @@ -192,12 +192,13 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; ["amd"] -class Initial +interface Initial { void shutdown(); diff --git a/python/test/Ice/proxy/Test.ice b/python/test/Ice/proxy/Test.ice index 239c473918a..46912931594 100644 --- a/python/test/Ice/proxy/Test.ice +++ b/python/test/Ice/proxy/Test.ice @@ -14,14 +14,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/python/test/Ice/proxy/TestAMD.ice b/python/test/Ice/proxy/TestAMD.ice index 1df348cef04..4c5e5afa003 100644 --- a/python/test/Ice/proxy/TestAMD.ice +++ b/python/test/Ice/proxy/TestAMD.ice @@ -14,14 +14,14 @@ module Test { -["amd"] class MyClass +["amd"] interface MyClass { void shutdown(); Ice::Context getContext(); }; -["amd"] class MyDerivedClass extends MyClass +["amd"] interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/python/test/Slice/escape/Client.py b/python/test/Slice/escape/Client.py index 882e9739329..1d91d29d434 100755 --- a/python/test/Slice/escape/Client.py +++ b/python/test/Slice/escape/Client.py @@ -32,10 +32,6 @@ class execI(_and._execDisp): def _finally(self, current=None): assert current.operation == "finally" -class forI(_and._forDisp): - def foo(self, _from, current=None): - pass - class ifI(_and._ifDisp): def _elifAsync(self, _else, current=None): pass @@ -61,7 +57,7 @@ def testtypes(): assert "_finally" in dir(_and.execPrx) d1 = execI() - e1 = forI() + e1 = _and._for() f = _and.ifPrx.uncheckedCast(None) assert "_finally" in dir(_and.ifPrx) diff --git a/python/test/Slice/escape/Key.ice b/python/test/Slice/escape/Key.ice index 777193a6c2b..1d530e8fc8a 100644 --- a/python/test/Slice/escape/Key.ice +++ b/python/test/Slice/escape/Key.ice @@ -32,7 +32,8 @@ module and class for { int lambda; - void foo(exec* from, out int global); + exec* from; + int global; }; class if extends for implements exec, del @@ -46,6 +47,7 @@ module and { int lambda; }; + exception not extends is { int or; @@ -54,14 +56,15 @@ module and local interface print { - assert raise(continue else, for return, if try, del* while, exec* yield, - for* lambda, if* or, int global) - throws is; + assert raise(continue else, for return, if try, del* while, exec* yield, + for* lambda, if* or, int global) + throws is; }; const int lambda = 0; - enum EnumNone { + enum EnumNone + { None }; }; diff --git a/ruby/test/Ice/checksum/CTypes.ice b/ruby/test/Ice/checksum/CTypes.ice index 66014750174..51a18734e96 100644 --- a/ruby/test/Ice/checksum/CTypes.ice +++ b/ruby/test/Ice/checksum/CTypes.ice @@ -378,7 +378,7 @@ exception OptionalEx4 // // TEST: Same // -class BaseClass1 +interface BaseInterface1 { void baseOp1(); void baseOp2(int i, out string s) throws Exception1; @@ -387,7 +387,7 @@ class BaseClass1 // // TEST: Change return type // -class BaseClass2 +interface BaseInterface2 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -396,7 +396,7 @@ class BaseClass2 // // TEST: Add parameter // -class BaseClass3 +interface BaseInterface3 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -405,7 +405,7 @@ class BaseClass3 // // TEST: Add exception // -class BaseClass4 +interface BaseInterface4 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -414,7 +414,7 @@ class BaseClass4 // // TEST: Change out parameter to in parameter // -class BaseClass5 +interface BaseInterface5 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -423,7 +423,7 @@ class BaseClass5 // // TEST: Remove parameter // -class BaseClass6 +interface BaseInterface6 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -432,7 +432,7 @@ class BaseClass6 // // TEST: Remove exception // -class BaseClass7 +interface BaseInterface7 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -441,34 +441,16 @@ class BaseClass7 // // TEST: Remove operation // -class BaseClass8 +interface BaseInterface8 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; }; // -// TEST: Add base class -// -class BaseClass9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add interface -// -class BaseClass10 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -}; - -// -// TEST: Add base class and interface +// TEST: Add base interface // -class BaseClass11 +interface BaseInterface9 { void baseOp(); void baseOp2(int i, out string s) throws Exception1; @@ -479,8 +461,7 @@ class BaseClass11 // class Compact1(1) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -495,8 +476,7 @@ class Derived1 extends Compact1 // class Compact2(2) { - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; + int id; }; // @@ -550,53 +530,53 @@ class Optional4 }; // -// TEST: Class with optional parameters. +// TEST: Interface with optional parameters. // -class OptionalParameters0 +interface OptionalParameters0 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different order. +// TEST: Interface with optional parameters, different order. // -class OptionalParameters1 +interface OptionalParameters1 { void op1(string firstName, optional(1) string secondName, optional(2) string emailAddress); }; // -// TEST: Class with optional parameters, different tags. +// TEST: Interface with optional parameters, different tags. // -class OptionalParameters2 +interface OptionalParameters2 { void op1(string firstName, optional(1) string emailAddress, optional(2) string secondName); }; // -// TEST: Class with different optional parameters. +// TEST: Interface with different optional parameters. // -class OptionalParameters3 +interface OptionalParameters3 { void op1(string firstName, optional(1) string emailAddress, string secondName); }; // -// TEST: Class with optional return type. +// TEST: Interface with optional return type. // -class OptionalReturn0 +interface OptionalReturn0 { optional(1) int op(); }; // -// TEST: Class that changes optional return type. +// TEST: Interface that changes optional return type. // -class OptionalReturn2 +interface OptionalReturn2 { optional(1) int op(); }; diff --git a/ruby/test/Ice/inheritance/Test.ice b/ruby/test/Ice/inheritance/Test.ice index 2e9b176c00b..28faa3b8c9e 100644 --- a/ruby/test/Ice/inheritance/Test.ice +++ b/ruby/test/Ice/inheritance/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { diff --git a/ruby/test/Ice/objects/Test.ice b/ruby/test/Ice/objects/Test.ice index 0a17a1c00b9..6ce2ce97fb1 100644 --- a/ruby/test/Ice/objects/Test.ice +++ b/ruby/test/Ice/objects/Test.ice @@ -9,6 +9,8 @@ #pragma once +[["suppress-warning:deprecated"]] // For classes with operations + module Test { @@ -67,16 +69,12 @@ class D { int i; string s; - - bool checkValues(); }; class F { ["protected"] E e1; E e2; - - bool checkValues(); }; interface I diff --git a/ruby/test/Ice/operations/Test.ice b/ruby/test/Ice/operations/Test.ice index b7820454f63..2a80664cde9 100644 --- a/ruby/test/Ice/operations/Test.ice +++ b/ruby/test/Ice/operations/Test.ice @@ -21,7 +21,7 @@ enum MyEnum enum3 }; -class MyClass; +interface MyClass; struct AnotherStruct { @@ -91,7 +91,7 @@ dictionary<string, DoubleS> StringDoubleSD; dictionary<string, StringS> StringStringSD; dictionary<MyEnum, MyEnumS> MyEnumMyEnumSD; -class MyClass +interface MyClass { void shutdown(); @@ -272,7 +272,7 @@ class MyClass1 string myClass1; // Same name as the enclosing class }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { void opDerived(); MyClass1 opMyClass1(MyClass1 opMyClass1); diff --git a/ruby/test/Ice/operations/Twoways.rb b/ruby/test/Ice/operations/Twoways.rb index 43bf0d5f840..60b5806b593 100644 --- a/ruby/test/Ice/operations/Twoways.rb +++ b/ruby/test/Ice/operations/Twoways.rb @@ -98,7 +98,7 @@ def twoways(communicator, p) # # ice_isA # - test(p.ice_isA(Test::MyClass::ice_staticId())) + test(p.ice_isA("::Test::MyClass")) # # ice_ids @@ -112,13 +112,13 @@ def twoways(communicator, p) # # ice_id # - test(p.ice_id == Test::MyDerivedClass::ice_staticId()) + test(p.ice_id == "::Test::MyDerivedClass") # # Proxy ice_staticId # - test(Test::MyClassPrx::ice_staticId() == Test::MyClass::ice_staticId()) - test(Test::MyDerivedClassPrx::ice_staticId() == Test::MyDerivedClass::ice_staticId()) + test(Test::MyClassPrx::ice_staticId() == "::Test::MyClass") + test(Test::MyDerivedClassPrx::ice_staticId() == "::Test::MyDerivedClass") test(Ice::ObjectPrx::ice_staticId() == Ice::Value::ice_staticId()) # diff --git a/ruby/test/Ice/optional/ClientPrivate.ice b/ruby/test/Ice/optional/ClientPrivate.ice index 5dd08613b9a..90fc4c253ea 100644 --- a/ruby/test/Ice/optional/ClientPrivate.ice +++ b/ruby/test/Ice/optional/ClientPrivate.ice @@ -29,7 +29,7 @@ class D extends B // on the server and pass an optional argument. This isn't necessary in other language // mappings where the public stream API is available. // -class Initial2 +interface Initial2 { void opClassAndUnknownOptional(A p, optional(1) Object o); diff --git a/ruby/test/Ice/optional/Test.ice b/ruby/test/Ice/optional/Test.ice index 8019aaafe39..b70fcd56dad 100644 --- a/ruby/test/Ice/optional/Test.ice +++ b/ruby/test/Ice/optional/Test.ice @@ -192,11 +192,12 @@ class G class Recursive; sequence<Recursive> RecursiveSeq; -class Recursive { +class Recursive +{ optional(0) RecursiveSeq value; }; -class Initial +interface Initial { void shutdown(); diff --git a/ruby/test/Ice/proxy/Test.ice b/ruby/test/Ice/proxy/Test.ice index 239c473918a..46912931594 100644 --- a/ruby/test/Ice/proxy/Test.ice +++ b/ruby/test/Ice/proxy/Test.ice @@ -14,14 +14,14 @@ module Test { -class MyClass +interface MyClass { void shutdown(); Ice::Context getContext(); }; -class MyDerivedClass extends MyClass +interface MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/ruby/test/Slice/escape/Client.rb b/ruby/test/Slice/escape/Client.rb index 4fe7f1c03de..67b978b3ce4 100755 --- a/ruby/test/Slice/escape/Client.rb +++ b/ruby/test/Slice/escape/Client.rb @@ -32,10 +32,6 @@ def test(b) end end -class DisplayI < BEGIN_::Display - def _do(_dup, current=nil) - end -end def run(args, communicator) print "testing type names... " @@ -48,11 +44,12 @@ def run(args, communicator) test(c.method(:_to_a)) test(c.method(:_instance_variable_set)) test(c.method(:_instance_variables)) - d = BEGIN_::DisplayPrx::uncheckedCast(communicator.stringToProxy("test:tcp")) - test(d.method(:_do)) - d1 = DisplayI.new + d1 = BEGIN_::Display.new + d1._when = 0 + d1._do = 0 + d1._dup = communicator.stringToProxy("test:tcp") + d1._else = 0 e = BEGIN_::ElsifPrx::uncheckedCast(communicator.stringToProxy("test:tcp")) - test(e.method(:_do)) test(e.method(:_case)) f = BEGIN_::Next.new f._new = 0 diff --git a/ruby/test/Slice/escape/Key.ice b/ruby/test/Slice/escape/Key.ice index 484fb65255f..292407a04e0 100644 --- a/ruby/test/Slice/escape/Key.ice +++ b/ruby/test/Slice/escape/Key.ice @@ -32,7 +32,9 @@ module BEGIN class display { int when; - void do(break* dup, out int else); + int do; + break* dup; + int else; }; class elsif extends display implements break |