diff options
author | Austin Henriksen <austin@zeroc.com> | 2019-10-30 05:14:29 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2021-02-01 16:46:35 -0500 |
commit | 452f57976a135c8b72fc8d8f580d5d50618c0cae (patch) | |
tree | 0233eedd3cdc380126fd613b04b8b468beb289c0 /python/test | |
parent | Remove IcePatch2 (#602) (diff) | |
download | ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.bz2 ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.xz ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.zip |
Remove checksum support (#607)
* Removed checksum sources from swift mapping project file.
* Removed checksum tests from Python.
* Removed checksum from Python mapping.
* Removed checksum tests from PHP mapping.
* Removed checksum support from PHP mapping.
* Removed checksum sources from MATLAB project file.
* Removed checksum option from slice2x manpages.
* Removed checksum sources from JavaScript mapping.
* Removed checksum tests from Java mapping.
* Removed outdated checksum metadata from Java mapping.
* Removed checksum support from Java mapping.
* Removed checksum tests from csharp.
* Removed checksum support from csharp mapping.
* Removed checksum tests from cpp
* Removed checksum support from IceBox.
* Removed checksum support from IceStorm.
* Removed Slice checksum support from IceGrid.
* Fixed broken filters file for Slice VS project.
* Removed checksum support from cpp mapping.
* Removed checksum support from Slice definitions.
* Removed checksum support from cpp98 mapping.
Diffstat (limited to 'python/test')
-rw-r--r-- | python/test/Ice/checksum/AllTests.py | 53 | ||||
-rw-r--r-- | python/test/Ice/checksum/CTypes.ice | 609 | ||||
-rwxr-xr-x | python/test/Ice/checksum/Client.py | 15 | ||||
-rw-r--r-- | python/test/Ice/checksum/STypes.ice | 606 | ||||
-rwxr-xr-x | python/test/Ice/checksum/Server.py | 30 | ||||
-rw-r--r-- | python/test/Ice/checksum/Test.ice | 19 |
6 files changed, 0 insertions, 1332 deletions
diff --git a/python/test/Ice/checksum/AllTests.py b/python/test/Ice/checksum/AllTests.py deleted file mode 100644 index 332a32542ac..00000000000 --- a/python/test/Ice/checksum/AllTests.py +++ /dev/null @@ -1,53 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -import sys, string, re, traceback, Ice, Test - -def test(b): - if not b: - raise RuntimeError('test assertion failed') - -def allTests(helper, communicator): - ref = "test:{0}".format(helper.getTestEndpoint()) - base = communicator.stringToProxy(ref) - test(base) - - checksum = Test.ChecksumPrx.checkedCast(base) - test(checksum) - - # - # Verify that no checksums are present for local types. - # - sys.stdout.write("testing checksums... ") - sys.stdout.flush() - test(len(Ice.sliceChecksums) > 0) - for i in Ice.sliceChecksums: - test(i.find("Local") == -1) - - # - # Get server's Slice checksums. - # - d = checksum.getSliceChecksums() - - # - # Compare the checksums. For a type FooN whose name ends in an integer N, - # we assume that the server's type does not change for N = 1, and does - # change for N > 1. - # - patt = re.compile("\\d+") - for i in d: - n = 0 - m = patt.search(i) - if m: - n = int(i[m.start():]) - test(i in Ice.sliceChecksums) - - if n <= 1: - test(Ice.sliceChecksums[i] == d[i]) - else: - test(Ice.sliceChecksums[i] != d[i]) - - print("ok") - - checksum.shutdown() diff --git a/python/test/Ice/checksum/CTypes.ice b/python/test/Ice/checksum/CTypes.ice deleted file mode 100644 index 0c4052d76b0..00000000000 --- a/python/test/Ice/checksum/CTypes.ice +++ /dev/null @@ -1,609 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#pragma once - -module Test -{ - -// -// TEST: Same -// -const int IntConst1 = 100; - -// -// TEST: Value changed -// -const int IntConst2 = 100; - -// -// TEST: Type changed -// -const int IntConst3 = 100; - -// -// TEST: Same -// -enum Enum1 { Enum11, Enum12, Enum13 } - -// -// TEST: Add enumerator -// -enum Enum2 { Enum21, Enum22, Enum23 } - -// -// TEST: Remove enumerator -// -enum Enum3 { Enum31, Enum32, Enum33 } - -// -// TEST: Change to a different type -// -enum Enum4 { Enum41, Enum42, Enum43 } - -// -// TEST: Enum with explicit values. -// -enum EnumExplicit0 { EnumExplicit01 = 1, EnumExplicit02 = 2, EnumExplicit03 = 3 } - -// -// TEST: Enum with same explicit values, different order. -// -enum EnumExplicit1 { EnumExplicit11 = 1, EnumExplicit12 = 2, EnumExplicit13 = 3 } - -// -// TEST: Enum with different explicit values. -// -enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 2, EnumExplicit23 = 3} - -// -// TEST: Enum with explicit values, removed enumerator. -// -enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2, EnumExplicit33 = 3} - -// -// TEST: Same -// -sequence<int> Sequence1; - -// -// TEST: Change sequence type -// -sequence<int> Sequence2; - -// -// TEST: Change to a different type -// -sequence<int> Sequence3; - -// -// TEST: Same -// -dictionary<string, int> Dictionary1; - -// -// TEST: Change key type -// -dictionary<string, int> Dictionary2; - -// -// TEST: Change value type -// -dictionary<string, int> Dictionary3; - -// -// TEST: Change to a different type -// -dictionary<string, int> Dictionary4; - -// -// TEST: Same -// -struct Struct1 -{ - string str; - bool b; -} - -// -// TEST: Add member -// -struct Struct2 -{ - string str; - bool b; -} - -// -// TEST: Change member type -// -struct Struct3 -{ - string str; - bool b; -} - -// -// TEST: Remove member -// -struct Struct4 -{ - string str; - bool b; -} - -// -// TEST: Change to a different type -// -struct Struct5 -{ - string str; - bool b; -} - -// -// TEST: Same -// -interface Interface1 -{ -} - -// -// TEST: Change interface to class -// -interface Interface2 -{ -} - -// -// TEST: Add base interface -// -interface Interface3 -{ -} - -// -// TEST: Add operation -// -interface Interface4 -{ -} - -// -// TEST: Same -// -class EmptyClass1 -{ -} - -// -// TEST: Add data member -// -class EmptyClass2 -{ -} - -// -// TEST: Add operation -// -class EmptyClass3 -{ -} - -// -// TEST: Add base class -// -class EmptyClass4 -{ -} - -// -// TEST: Add interface -// -class EmptyClass5 -{ -} - -// -// TEST: Same -// -class SimpleClass1 -{ - string str; - float f; -} - -// -// TEST: Add operation -// -class SimpleClass2 -{ - string str; - float f; -} - -// -// TEST: Rename member -// -class SimpleClass3 -{ - string str; - float f; -} - -// -// TEST: Add member -// -class SimpleClass4 -{ - string str; - float f; -} - -// -// TEST: Remove member -// -class SimpleClass5 -{ - string str; - float f; -} - -// -// TEST: Reorder members -// -class SimpleClass6 -{ - string str; - float f; -} - -// -// TEST: Change member type -// -class SimpleClass7 -{ - string str; - float f; -} - -// -// TEST: Same -// -exception Exception1 -{ - string str; - bool b; -} - -// -// TEST: Add member -// -exception Exception2 -{ - string str; - bool b; -} - -// -// TEST: Change member type -// -exception Exception3 -{ - string str; - bool b; -} - -// -// TEST: Remove member -// -exception Exception4 -{ - string str; - bool b; -} - -// -// TEST: Add base exception -// -exception Exception5 -{ -} - -// -// TEST: Change to a different type -// -exception Exception6 -{ - string str; - bool b; -} - -// -// TEST: Exception with optional members. -// -exception OptionalEx0 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Exception with optional members, different order, same tags. -// -exception OptionalEx1 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Exception with different optional members. -// -exception OptionalEx2 -{ - string firstName; - string secondName; - optional(1) string emailAddress; -} - -// -// TEST: Exception with different optional members. -// -exception OptionalEx3 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Exception with optional members using different tags. -// -exception OptionalEx4 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Same -// -interface BaseInterface1 -{ - void baseOp1(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Change return type -// -interface BaseInterface2 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add parameter -// -interface BaseInterface3 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add exception -// -interface BaseInterface4 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Change out parameter to in parameter -// -interface BaseInterface5 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Remove parameter -// -interface BaseInterface6 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Remove exception -// -interface BaseInterface7 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Remove operation -// -interface BaseInterface8 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add base interface -// -interface BaseInterface9 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Class with compact id -// -class Compact1(1) -{ - int id; -} - -// -// TEST: Derived from class with compact id -// -class Derived1 extends Compact1 -{ -} - -// -// TEST: Same class names but different compact id -// -class Compact2(2) -{ - int id; -} - -// -// TEST: Class with optional members. -// -class Optional0 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Class with optional members, different order, same tags. -// -class Optional1 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Class with different optional members. -// -class Optional2 -{ - string firstName; - string secondName; - optional(1) string emailAddress; -} - -// -// TEST: Class with different optional members. -// -class Optional3 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Class with optional members using different tags. -// -class Optional4 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Interface with optional parameters. -// -interface OptionalParameters0 -{ - void op1(string firstName, optional(1) string secondName, - optional(2) string emailAddress); -} - -// -// TEST: Interface with optional parameters, different order. -// -interface OptionalParameters1 -{ - void op1(string firstName, optional(1) string secondName, - optional(2) string emailAddress); -} - -// -// TEST: Interface with optional parameters, different tags. -// -interface OptionalParameters2 -{ - void op1(string firstName, optional(1) string emailAddress, - optional(2) string secondName); -} - -// -// TEST: Interface with different optional parameters. -// -interface OptionalParameters3 -{ - void op1(string firstName, optional(1) string emailAddress, - string secondName); -} - -// -// TEST: Interface with optional return type. -// -interface OptionalReturn0 -{ - optional(1) int op(); -} - -// -// TEST: Interface that changes optional return type. -// -interface OptionalReturn2 -{ - optional(1) int op(); -} - -// -// TEST: Local -// -local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 } - -// -// TEST: Local -// -local sequence<string> LocalSequence; - -// -// TEST: Local -// -local dictionary<string, string> LocalDictionary; - -// -// TEST: Local -// -local struct LocalStruct -{ - string str; -} - -// -// TEST: Local -// -local class LocalClass -{ -} - -} diff --git a/python/test/Ice/checksum/Client.py b/python/test/Ice/checksum/Client.py deleted file mode 100755 index 52544d95ffb..00000000000 --- a/python/test/Ice/checksum/Client.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -from TestHelper import TestHelper -TestHelper.loadSlice("--checksum Test.ice CTypes.ice") -import AllTests - - -class Client(TestHelper): - - def run(self, args): - with self.initialize(args=args) as communicator: - AllTests.allTests(self, communicator) diff --git a/python/test/Ice/checksum/STypes.ice b/python/test/Ice/checksum/STypes.ice deleted file mode 100644 index 9f84edf2cbd..00000000000 --- a/python/test/Ice/checksum/STypes.ice +++ /dev/null @@ -1,606 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#pragma once - -module Test -{ - -// -// TEST: Same -// -const int IntConst1 = 100; - -// -// TEST: Value changed -// -const int IntConst2 = 1000; - -// -// TEST: Type changed -// -const short IntConst3 = 100; - -// -// TEST: Same -// -enum Enum1 { Enum11, Enum12, Enum13 } - -// -// TEST: Add enumerator -// -enum Enum2 { Enum21, Enum22, Enum23, Enum24 } - -// -// TEST: Remove enumerator -// -enum Enum3 { Enum32, Enum33 } - -// -// TEST: Enum with explicit values. -// -enum EnumExplicit0 { EnumExplicit01 = 1, EnumExplicit02 = 2, EnumExplicit03 = 3 } - -// -// TEST: Enum with same explicit values, different order. -// -enum EnumExplicit1 { EnumExplicit11 = 1, EnumExplicit13 = 3, EnumExplicit12 = 2 } - -// -// TEST: Enum with different explicit values. -// -enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 3, EnumExplicit23 } - -// -// TEST: Enum with explicit values, removed enumerator. -// -enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2} - -// -// TEST: Change to a different type -// -class Enum4 {} - -// -// TEST: Same -// -sequence<int> Sequence1; - -// -// TEST: Change sequence type -// -sequence<short> Sequence2; - -// -// TEST: Change to a different type -// -class Sequence3 {} - -// -// TEST: Same -// -dictionary<string, int> Dictionary1; - -// -// TEST: Change key type -// -dictionary<long, int> Dictionary2; - -// -// TEST: Change value type -// -dictionary<string, bool> Dictionary3; - -// -// TEST: Change to a different type -// -class Dictionary4 {} - -// -// TEST: Same -// -struct Struct1 -{ - string str; - bool b; -} - -// -// TEST: Add member -// -struct Struct2 -{ - string str; - bool b; - float f; -} - -// -// TEST: Change member type -// -struct Struct3 -{ - string str; - double b; -} - -// -// TEST: Remove member -// -struct Struct4 -{ - bool b; -} - -// -// TEST: Change to a different type -// -class Struct5 {} - -// -// TEST: Same -// -interface Interface1 -{ -} - -// -// TEST: Change interface to class -// -class Interface2 -{ -} - -// -// TEST: Add base interface -// -interface Interface3 extends Interface1 -{ -} - -// -// TEST: Add operation -// -interface Interface4 -{ - void opInterface4(); -} - -// -// TEST: Same -// -class EmptyClass1 -{ -} - -// -// TEST: Add data member -// -class EmptyClass2 -{ - double d; -} - -// -// TEST: Add operation -// -class EmptyClass3 -{ - void newOp(); -} - -// -// TEST: Add base class -// -class EmptyClass4 extends EmptyClass1 -{ -} - -// -// TEST: Add interface -// -class EmptyClass5 implements Interface1 -{ -} - -// -// TEST: Same -// -class SimpleClass1 -{ - string str; - float f; -} - -// -// TEST: Add operation -// -class SimpleClass2 -{ - string str; - float f; - void newOp(); -} - -// -// TEST: Rename member -// -class SimpleClass3 -{ - string str; - float g; -} - -// -// TEST: Add member -// -class SimpleClass4 -{ - string str; - float f; - bool b; -} - -// -// TEST: Remove member -// -class SimpleClass5 -{ - string str; -} - -// -// TEST: Reorder members -// -class SimpleClass6 -{ - float f; - string str; -} - -// -// TEST: Change member type -// -class SimpleClass7 -{ - string str; - double f; -} - -// -// TEST: Same -// -exception Exception1 -{ - string str; - bool b; -} - -// -// TEST: Add member -// -exception Exception2 -{ - string str; - bool b; - float f; -} - -// -// TEST: Change member type -// -exception Exception3 -{ - string str; - double b; -} - -// -// TEST: Remove member -// -exception Exception4 -{ - bool b; -} - -// -// TEST: Add base exception -// -exception Exception5 extends Exception1 -{ -} - -// -// TEST: Change to a different type -// -class Exception6 {} - -// -// TEST: Exception with optional members. -// -exception OptionalEx0 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Exception with optional members, different order, same tags. -// -exception OptionalEx1 -{ - string firstName; - optional(2) string emailAddress; - optional(1) string secondName; -} - -// -// TEST: Exception with different optional members. -// -exception OptionalEx2 -{ - string firstName; - optional(1) string secondName; - string emailAddress; -} - -// -// TEST: Exception with different optional members. -// -exception OptionalEx3 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; - optional(3) string phoneNumber; -} - -// -// TEST: Exception with optional members using different tags. -// -exception OptionalEx4 -{ - string firstName; - optional(2) string secondName; - optional(1) string emailAddress; -} - -// -// TEST: Same -// -interface BaseInterface1 -{ - void baseOp1(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Change return type -// -interface BaseInterface2 -{ - int baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add parameter -// -interface BaseInterface3 -{ - void baseOp(Object o); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add exception -// -interface BaseInterface4 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1, Exception2; -} - -// -// TEST: Change out parameter to in parameter -// -interface BaseInterface5 -{ - void baseOp(); - void baseOp2(int i, string s) throws Exception1; -} - -// -// TEST: Remove parameter -// -interface BaseInterface6 -{ - void baseOp(); - void baseOp2(out string s) throws Exception1; -} - -// -// TEST: Remove exception -// -interface BaseInterface7 -{ - void baseOp(); - void baseOp2(int i, out string s); -} - -// -// TEST: Remove operation -// -interface BaseInterface8 -{ - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Add base class -// -interface BaseInterface9 extends Interface1 -{ - void baseOp(); - void baseOp2(int i, out string s) throws Exception1; -} - -// -// TEST: Class with compact id -// -class Compact1(1) -{ - int id; -} - -// -// TEST: Derived from class with compact id -// -class Derived1 extends Compact1 -{ -} - -// -// TEST: Same class names but different compact id -// -class Compact2(3) -{ - int id; -} - -// -// TEST: Class with optional members. -// -class Optional0 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; -} - -// -// TEST: Class with optional members, different order, same tags. -// -class Optional1 -{ - string firstName; - optional(2) string emailAddress; - optional(1) string secondName; -} - -// -// TEST: Class with different optional members. -// -class Optional2 -{ - string firstName; - optional(1) string secondName; - string emailAddress; -} - -// -// TEST: Class with different optional members. -// -class Optional3 -{ - string firstName; - optional(1) string secondName; - optional(2) string emailAddress; - optional(3) string phoneNumber; -} - -// -// TEST: Class with optional members using different tags. -// -class Optional4 -{ - string firstName; - optional(2) string secondName; - optional(1) string emailAddress; -} - -// -// TEST: Interface with optional parameters. -// -interface OptionalParameters0 -{ - void op1(string firstName, optional(1) string secondName, - optional(2) string emailAddress); -} - -// -// TEST: Interface with optional parameters, different order. -// -interface OptionalParameters1 -{ - void op1(string firstName, optional(2) string emailAddress, - optional(1) string secondName); -} - -// -// TEST: Interface with optional parameters, different tags. -// -interface OptionalParameters2 -{ - void op1(string firstName, optional(2) string emailAddress, - optional(1) string secondName); -} - -// -// TEST: Interface with different optional parameters. -// -interface OptionalParameters3 -{ - void op1(string firstName, string emailAddress, - optional(1) string secondName); -} - -// -// TEST: Interface with optional return type. -// -interface OptionalReturn0 -{ - optional(1) int op(); -} - -// -// TEST: Interface that changes optional return type. -// -interface OptionalReturn2 -{ - int op(); -} - -// -// TEST: Local -// -local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 } - -// -// TEST: Local -// -local sequence<string> LocalSequence; - -// -// TEST: Local -// -local dictionary<string, string> LocalDictionary; - -// -// TEST: Local -// -local struct LocalStruct -{ - string str; -} - -// -// TEST: Local -// -local class LocalClass -{ -} - -} diff --git a/python/test/Ice/checksum/Server.py b/python/test/Ice/checksum/Server.py deleted file mode 100755 index ef3cb2bfe86..00000000000 --- a/python/test/Ice/checksum/Server.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -import Ice -from TestHelper import TestHelper -TestHelper.loadSlice("--checksum Test.ice STypes.ice") -import Test - - -class ChecksumI(Test.Checksum): - def getSliceChecksums(self, current=None): - return Ice.sliceChecksums - - def shutdown(self, current=None): - current.adapter.getCommunicator().shutdown() - - -class Server(TestHelper): - - def run(self, args): - - with self.initialize(args=args) as communicator: - - communicator.getProperties().setProperty("TestAdapter.Endpoints", self.getTestEndpoint()) - adapter = communicator.createObjectAdapter("TestAdapter") - adapter.add(ChecksumI(), Ice.stringToIdentity("test")) - adapter.activate() - communicator.waitForShutdown() diff --git a/python/test/Ice/checksum/Test.ice b/python/test/Ice/checksum/Test.ice deleted file mode 100644 index e487fe94669..00000000000 --- a/python/test/Ice/checksum/Test.ice +++ /dev/null @@ -1,19 +0,0 @@ -// -// Copyright (c) ZeroC, Inc. All rights reserved. -// - -#pragma once - -#include <Ice/SliceChecksumDict.ice> - -module Test -{ - -interface Checksum -{ - idempotent Ice::SliceChecksumDict getSliceChecksums(); - - void shutdown(); -} - -} |