summaryrefslogtreecommitdiff
path: root/python/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-02-10 10:38:44 +0100
committerJose <jose@zeroc.com>2017-02-10 10:38:44 +0100
commit24e4a7e926c8ef99bf531c1576b940fb1b1c42d1 (patch)
treea8952b230126a983b7db08fce316124612169018 /python/test
parentFixed ICE-7554 - Ice/ami failure on macOS (diff)
downloadice-24e4a7e926c8ef99bf531c1576b940fb1b1c42d1.tar.bz2
ice-24e4a7e926c8ef99bf531c1576b940fb1b1c42d1.tar.xz
ice-24e4a7e926c8ef99bf531c1576b940fb1b1c42d1.zip
Fix (ICE-7562) - Eliminate class-with-operation deprecated warnings
Diffstat (limited to 'python/test')
-rw-r--r--python/test/Ice/checksum/AllTests.py1
-rw-r--r--python/test/Ice/checksum/CTypes.ice68
-rw-r--r--python/test/Ice/checksum/STypes.ice66
-rw-r--r--python/test/Ice/inheritance/Test.ice2
-rw-r--r--python/test/Ice/objects/Test.ice6
-rw-r--r--python/test/Ice/operations/OnewaysAMI.py2
-rw-r--r--python/test/Ice/operations/OnewaysFuture.py2
-rw-r--r--python/test/Ice/operations/Test.ice6
-rw-r--r--python/test/Ice/operations/TestAMD.ice6
-rw-r--r--python/test/Ice/operations/Twoways.py8
-rw-r--r--python/test/Ice/operations/TwowaysAMI.py2
-rw-r--r--python/test/Ice/operations/TwowaysFuture.py2
-rw-r--r--python/test/Ice/optional/ClientPrivate.ice2
-rw-r--r--python/test/Ice/optional/Test.ice2
-rw-r--r--python/test/Ice/optional/TestAMD.ice5
-rw-r--r--python/test/Ice/proxy/Test.ice4
-rw-r--r--python/test/Ice/proxy/TestAMD.ice4
-rwxr-xr-xpython/test/Slice/escape/Client.py6
-rw-r--r--python/test/Slice/escape/Key.ice13
19 files changed, 83 insertions, 124 deletions
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
};
};