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 /ruby | |
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 'ruby')
-rw-r--r-- | ruby/ruby/Ice.rb | 5 | ||||
-rw-r--r-- | ruby/src/IceRuby/Slice.cpp | 5 | ||||
-rw-r--r-- | ruby/test/Ice/checksum/AllTests.rb | 59 | ||||
-rw-r--r-- | ruby/test/Ice/checksum/CTypes.ice | 609 | ||||
-rwxr-xr-x | ruby/test/Ice/checksum/Client.rb | 17 | ||||
-rw-r--r-- | ruby/test/Ice/checksum/Test.ice | 19 |
6 files changed, 1 insertions, 713 deletions
diff --git a/ruby/ruby/Ice.rb b/ruby/ruby/Ice.rb index f0c7bbe1513..0fa18b35759 100644 --- a/ruby/ruby/Ice.rb +++ b/ruby/ruby/Ice.rb @@ -236,11 +236,6 @@ module Ice private_class_method :new end - - # - # Slice checksum dictionary. - # - SliceChecksums = {} end # diff --git a/ruby/src/IceRuby/Slice.cpp b/ruby/src/IceRuby/Slice.cpp index 7faf4c52d6e..904ef27c95a 100644 --- a/ruby/src/IceRuby/Slice.cpp +++ b/ruby/src/IceRuby/Slice.cpp @@ -55,7 +55,6 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) opts.addOpt("d", "debug"); opts.addOpt("", "ice"); opts.addOpt("", "underscore"); - opts.addOpt("", "checksum"); opts.addOpt("", "all"); vector<string> files; @@ -83,7 +82,6 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) bool ice = true; // This must be true so that we can create Ice::Identity when necessary. bool underscore = opts.isSet("underscore"); bool all = false; - bool checksum = false; if(opts.isSet("D")) { vector<string> optargs = opts.argVec("D"); @@ -110,7 +108,6 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) } debug = opts.isSet("d") || opts.isSet("debug"); all = opts.isSet("all"); - checksum = opts.isSet("checksum"); bool ignoreRedefs = false; @@ -144,7 +141,7 @@ IceRuby_loadSlice(int argc, VALUE* argv, VALUE /*self*/) // Ruby magic comment to set the file encoding, it must be first or second line // out << "# encoding: utf-8\n"; - generate(u, all, checksum, includePaths, out); + generate(u, all, includePaths, out); u->destroy(); string code = codeStream.str(); diff --git a/ruby/test/Ice/checksum/AllTests.rb b/ruby/test/Ice/checksum/AllTests.rb deleted file mode 100644 index 0e71e5947c0..00000000000 --- a/ruby/test/Ice/checksum/AllTests.rb +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -def test(b) - if !b - raise RuntimeError, 'test assertion failed' - end -end - -def allTests(helper, communicator) - ref = "test:#{helper.getTestEndpoint()}" - base = communicator.stringToProxy(ref) - test(base) - - checksum = Test::ChecksumPrx::checkedCast(base) - test(checksum) - - # - # Verify that no checksums are present for local types. - # - print "testing checksums... " - STDOUT.flush - test(Ice::SliceChecksums.length > 0) - for i in Ice::SliceChecksums.keys - test(!i.include?("Local")) - end - - # - # 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 = Regexp.new("\\d+") - for i in d.keys - n = 0 - m = patt.match(i) - if m - n = i[m.begin(0)...i.length].to_i - end - - test(Ice::SliceChecksums.has_key?(i)) - - if n <= 1 - test(Ice::SliceChecksums[i] == d[i]) - else - test(Ice::SliceChecksums[i] != d[i]) - end - end - - puts "ok" - - return checksum -end diff --git a/ruby/test/Ice/checksum/CTypes.ice b/ruby/test/Ice/checksum/CTypes.ice deleted file mode 100644 index 0c4052d76b0..00000000000 --- a/ruby/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/ruby/test/Ice/checksum/Client.rb b/ruby/test/Ice/checksum/Client.rb deleted file mode 100755 index 0b74d4bf4e4..00000000000 --- a/ruby/test/Ice/checksum/Client.rb +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env ruby -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# - -require "Ice" -Ice::loadSlice("'-I#{Ice.getSliceDir}' --checksum Test.ice CTypes.ice") -require './AllTests' - -class Client < ::TestHelper - def run(args) - self.init(args:args) do |communicator| - checksum = allTests(self, communicator) - checksum.shutdown() - end - end -end diff --git a/ruby/test/Ice/checksum/Test.ice b/ruby/test/Ice/checksum/Test.ice deleted file mode 100644 index e487fe94669..00000000000 --- a/ruby/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(); -} - -} |