Skip to content

Commit

Permalink
Rename 'SmallStruct' to 'LargeStruct'.
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere committed Jun 4, 2024
1 parent 4675c80 commit 0ab81ae
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 110 deletions.
18 changes: 9 additions & 9 deletions cpp/test/Ice/stream/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ allTests(Test::TestHelper* helper)

{
Ice::OutputStream out(communicator);
SmallStruct s;
LargeStruct s;
s.bo = true;
s.by = 1;
s.sh = 2;
Expand All @@ -242,7 +242,7 @@ allTests(Test::TestHelper* helper)
out.write(s);
out.finished(data);
Ice::InputStream in(communicator, data);
SmallStruct s2;
LargeStruct s2;
in.read(s2);
test(s2.p == s.p);
s2.p = s.p; // otherwise the s2 == s below will fail
Expand Down Expand Up @@ -564,10 +564,10 @@ allTests(Test::TestHelper* helper)
}

{
SmallStructS arr;
LargeStructS arr;
for (int i = 0; i < 4; ++i)
{
SmallStruct s;
LargeStruct s;
s.bo = true;
s.by = 1;
s.sh = 2;
Expand All @@ -585,29 +585,29 @@ allTests(Test::TestHelper* helper)
out.writePendingValues();
out.finished(data);
Ice::InputStream in(communicator, data);
SmallStructS arr2;
LargeStructS arr2;
in.read(arr2);
in.readPendingValues();
test(arr2.size() == arr.size());

for (SmallStructS::size_type j = 0; j < arr2.size(); ++j)
for (LargeStructS::size_type j = 0; j < arr2.size(); ++j)
{
test(arr[j].p == arr2[j].p);
arr2[j].p = arr[j].p;
test(arr[j] == arr2[j]);
}

SmallStructSS arrS;
LargeStructSS arrS;
arrS.push_back(arr);
arrS.push_back(SmallStructS());
arrS.push_back(LargeStructS());
arrS.push_back(arr);

Ice::OutputStream out2(communicator);
out2.write(arrS);
out2.finished(data);

Ice::InputStream in2(communicator, data);
SmallStructSS arr2S;
LargeStructSS arr2S;
in2.read(arr2S);
}

Expand Down
8 changes: 4 additions & 4 deletions cpp/test/Ice/stream/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enum MyEnum
interface MyInterface;
class MyClass;

struct SmallStruct
struct LargeStruct
{
bool bo;
byte by;
Expand Down Expand Up @@ -47,7 +47,7 @@ class OptionalClass
}

sequence<MyEnum> MyEnumS;
sequence<SmallStruct> SmallStructS;
sequence<LargeStruct> LargeStructS;
sequence<MyClass> MyClassS;

sequence<Ice::BoolSeq> BoolSS;
Expand All @@ -59,7 +59,7 @@ sequence<Ice::FloatSeq> FloatSS;
sequence<Ice::DoubleSeq> DoubleSS;
sequence<Ice::StringSeq> StringSS;
sequence<MyEnumS> MyEnumSS;
sequence<SmallStructS> SmallStructSS;
sequence<LargeStructS> LargeStructSS;
sequence<MyClassS> MyClassSS;

dictionary<byte, bool> ByteBoolD;
Expand All @@ -72,7 +72,7 @@ class MyClass
{
MyClass c;
Object o;
SmallStruct s;
LargeStruct s;
Ice::BoolSeq seq1;
Ice::ByteSeq seq2;
Ice::ShortSeq seq3;
Expand Down
68 changes: 34 additions & 34 deletions csharp/test/Ice/stream/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static public int allTests(global::Test.TestHelper helper)

{
outS = new Ice.OutputStream(communicator);
var s = new Test.SmallStruct();
var s = new Test.LargeStruct();
s.bo = true;
s.by = 1;
s.sh = 2;
Expand All @@ -271,9 +271,9 @@ static public int allTests(global::Test.TestHelper helper)
s.str = "7";
s.e = Test.MyEnum.enum2;
s.p = Test.MyInterfacePrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
Test.SmallStruct.ice_write(outS, s);
Test.LargeStruct.ice_write(outS, s);
var data = outS.finished();
var s2 = Test.SmallStruct.ice_read(new Ice.InputStream(communicator, data));
var s2 = Test.LargeStruct.ice_read(new Ice.InputStream(communicator, data));
test(s2.Equals(s));
}

Expand Down Expand Up @@ -500,20 +500,20 @@ static public int allTests(global::Test.TestHelper helper)
test(Compare(arr2S, arrS));
}

var smallStructArray = new Test.SmallStruct[3];
for (int i = 0; i < smallStructArray.Length; ++i)
var largeStructArray = new Test.LargeStruct[3];
for (int i = 0; i < largeStructArray.Length; ++i)
{
smallStructArray[i] = new Test.SmallStruct();
smallStructArray[i].bo = true;
smallStructArray[i].by = 1;
smallStructArray[i].sh = 2;
smallStructArray[i].i = 3;
smallStructArray[i].l = 4;
smallStructArray[i].f = 5.0f;
smallStructArray[i].d = 6.0;
smallStructArray[i].str = "7";
smallStructArray[i].e = Test.MyEnum.enum2;
smallStructArray[i].p = Test.MyInterfacePrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
largeStructArray[i] = new Test.LargeStruct();
largeStructArray[i].bo = true;
largeStructArray[i].by = 1;
largeStructArray[i].sh = 2;
largeStructArray[i].i = 3;
largeStructArray[i].l = 4;
largeStructArray[i].f = 5.0f;
largeStructArray[i].d = 6.0;
largeStructArray[i].str = "7";
largeStructArray[i].e = Test.MyEnum.enum2;
largeStructArray[i].p = Test.MyInterfacePrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
}

var myClassArray = new Test.MyClass[4];
Expand All @@ -522,7 +522,7 @@ static public int allTests(global::Test.TestHelper helper)
myClassArray[i] = new Test.MyClass();
myClassArray[i].c = myClassArray[i];
myClassArray[i].o = myClassArray[i];
myClassArray[i].s = new Test.SmallStruct();
myClassArray[i].s = new Test.LargeStruct();
myClassArray[i].s.e = Test.MyEnum.enum2;
myClassArray[i].seq1 = new bool[] { true, false, true, false };
myClassArray[i].seq2 = new byte[] { 1, 2, 3, 4 };
Expand Down Expand Up @@ -608,7 +608,7 @@ static public int allTests(global::Test.TestHelper helper)
{
outS = new Ice.OutputStream(communicator);
var obj = new Test.MyClass();
obj.s = new Test.SmallStruct();
obj.s = new Test.LargeStruct();
obj.s.e = Test.MyEnum.enum2;
var writer = new TestValueWriter(obj);
outS.writeValue(writer);
Expand Down Expand Up @@ -636,7 +636,7 @@ static public int allTests(global::Test.TestHelper helper)
var c = new Test.MyClass();
c.c = c;
c.o = c;
c.s = new Test.SmallStruct();
c.s = new Test.LargeStruct();
c.s.e = Test.MyEnum.enum2;
c.seq1 = new bool[] { true, false, true, false };
c.seq2 = new byte[] { 1, 2, 3, 4 };
Expand Down Expand Up @@ -732,11 +732,11 @@ static public int allTests(global::Test.TestHelper helper)
{
var dict = new Dictionary<string, Test.MyClass>();
var c = new Test.MyClass();
c.s = new Test.SmallStruct();
c.s = new Test.LargeStruct();
c.s.e = Test.MyEnum.enum2;
dict.Add("key1", c);
c = new Test.MyClass();
c.s = new Test.SmallStruct();
c.s = new Test.LargeStruct();
c.s.e = Test.MyEnum.enum3;
dict.Add("key2", c);
outS = new Ice.OutputStream(communicator);
Expand Down Expand Up @@ -786,15 +786,15 @@ static public int allTests(global::Test.TestHelper helper)

{
outS = new Ice.OutputStream(communicator);
var l = new List<Test.SmallStruct>(smallStructArray);
Test.SmallStructListHelper.write(outS, l);
var l = new List<Test.LargeStruct>(largeStructArray);
Test.LargeStructListHelper.write(outS, l);
var data = outS.finished();
inS = new Ice.InputStream(communicator, data);
var l2 = Test.SmallStructListHelper.read(inS);
var l2 = Test.LargeStructListHelper.read(inS);
test(l2.Count == l.Count);
for (int i = 0; i < l2.Count; ++i)
{
test(l2[i].Equals(smallStructArray[i]));
test(l2[i].Equals(largeStructArray[i]));
}
}

Expand Down Expand Up @@ -875,11 +875,11 @@ static public int allTests(global::Test.TestHelper helper)

{
outS = new Ice.OutputStream(communicator);
var l = new LinkedList<Test.SmallStruct>(smallStructArray);
Test.SmallStructLinkedListHelper.write(outS, l);
var l = new LinkedList<Test.LargeStruct>(largeStructArray);
Test.LargeStructLinkedListHelper.write(outS, l);
var data = outS.finished();
inS = new Ice.InputStream(communicator, data);
var l2 = Test.SmallStructLinkedListHelper.read(inS);
var l2 = Test.LargeStructLinkedListHelper.read(inS);
test(l2.Count == l.Count);
var e = l.GetEnumerator();
var e2 = l2.GetEnumerator();
Expand Down Expand Up @@ -913,11 +913,11 @@ static public int allTests(global::Test.TestHelper helper)

{
outS = new Ice.OutputStream(communicator);
var l = new Stack<Test.SmallStruct>(smallStructArray);
Test.SmallStructStackHelper.write(outS, l);
var l = new Stack<Test.LargeStruct>(largeStructArray);
Test.LargeStructStackHelper.write(outS, l);
byte[] data = outS.finished();
inS = new Ice.InputStream(communicator, data);
var l2 = Test.SmallStructStackHelper.read(inS);
var l2 = Test.LargeStructStackHelper.read(inS);
test(l2.Count == l.Count);
var e = l.GetEnumerator();
var e2 = l2.GetEnumerator();
Expand Down Expand Up @@ -964,11 +964,11 @@ static public int allTests(global::Test.TestHelper helper)

{
outS = new Ice.OutputStream(communicator);
var l = new Queue<Test.SmallStruct>(smallStructArray);
Test.SmallStructQueueHelper.write(outS, l);
var l = new Queue<Test.LargeStruct>(largeStructArray);
Test.LargeStructQueueHelper.write(outS, l);
var data = outS.finished();
inS = new Ice.InputStream(communicator, data);
var l2 = Test.SmallStructQueueHelper.read(inS);
var l2 = Test.LargeStructQueueHelper.read(inS);
test(l2.Count == l.Count);
var e = l.GetEnumerator();
var e2 = l2.GetEnumerator();
Expand Down
12 changes: 6 additions & 6 deletions csharp/test/Ice/stream/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum MyEnum
class MyClass;
interface MyInterface;

struct SmallStruct
struct LargeStruct
{
bool bo;
byte by;
Expand Down Expand Up @@ -74,7 +74,7 @@ sequence<byte> ByteList;
["cs:generic:List"]
sequence<MyEnum> MyEnumList;
["cs:generic:List"]
sequence<SmallStruct> SmallStructList;
sequence<LargeStruct> LargeStructList;
["cs:generic:List"]
sequence<MyClass> MyClassList;
["cs:generic:List"]
Expand All @@ -87,14 +87,14 @@ sequence<int> IntLinkedList;
["cs:generic:LinkedList"]
sequence<MyEnum> MyEnumLinkedList;
["cs:generic:LinkedList"]
sequence<SmallStruct> SmallStructLinkedList;
sequence<LargeStruct> LargeStructLinkedList;

["cs:generic:Stack"]
sequence<long> LongStack;
["cs:generic:Stack"]
sequence<float> FloatStack;
["cs:generic:Stack"]
sequence<SmallStruct> SmallStructStack;
sequence<LargeStruct> LargeStructStack;
["cs:generic:Stack"]
sequence<MyInterface*> MyInterfaceProxyStack;

Expand All @@ -119,7 +119,7 @@ sequence<double> DoubleQueue;
["cs:generic:Queue"]
sequence<string> StringQueue;
["cs:generic:Queue"]
sequence<SmallStruct> SmallStructQueue;
sequence<LargeStruct> LargeStructQueue;

["cs:generic:List"]
sequence<Ice::StringSeq> StringSList;
Expand All @@ -133,7 +133,7 @@ class MyClass
{
MyClass c;
Object o;
SmallStruct s;
LargeStruct s;
Ice::BoolSeq seq1;
Ice::ByteSeq seq2;
Ice::ShortSeq seq3;
Expand Down
18 changes: 9 additions & 9 deletions java/test/src/main/java/test/Ice/stream/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void run(String[] args) {

{
out = new OutputStream(communicator);
SmallStruct s = new SmallStruct();
LargeStruct s = new LargeStruct();
s.bo = true;
s.by = (byte) 1;
s.sh = (short) 2;
Expand All @@ -206,10 +206,10 @@ public void run(String[] args) {
s.str = "7";
s.e = MyEnum.enum2;
s.p = MyInterfacePrx.uncheckedCast(communicator.stringToProxy("test:default"));
SmallStruct.ice_write(out, s);
LargeStruct.ice_write(out, s);
byte[] data = out.finished();
in = new InputStream(communicator, data);
SmallStruct s2 = SmallStruct.ice_read(in);
LargeStruct s2 = LargeStruct.ice_read(in);
test(s2.equals(s));
}

Expand Down Expand Up @@ -440,7 +440,7 @@ public void run(String[] args) {
arr[i] = new MyClass();
arr[i].c = arr[i];
arr[i].o = arr[i];
arr[i].s = new SmallStruct();
arr[i].s = new LargeStruct();
arr[i].s.e = MyEnum.enum2;
arr[i].seq1 = new boolean[] {true, false, true, false};
arr[i].seq2 = new byte[] {(byte) 1, (byte) 2, (byte) 3, (byte) 4};
Expand Down Expand Up @@ -515,7 +515,7 @@ public void run(String[] args) {
{
out = new OutputStream(communicator);
MyClass obj = new MyClass();
obj.s = new SmallStruct();
obj.s = new LargeStruct();
obj.s.e = MyEnum.enum2;
TestObjectWriter writer = new TestObjectWriter(obj);
out.writeValue(writer);
Expand All @@ -527,7 +527,7 @@ public void run(String[] args) {
{
out = new OutputStream(communicator);
MyClass obj = new MyClass();
obj.s = new SmallStruct();
obj.s = new LargeStruct();
obj.s.e = MyEnum.enum2;
TestObjectWriter writer = new TestObjectWriter(obj);
out.writeValue(writer);
Expand All @@ -554,7 +554,7 @@ public void run(String[] args) {
MyClass c = new MyClass();
c.c = c;
c.o = c;
c.s = new SmallStruct();
c.s = new LargeStruct();
c.s.e = MyEnum.enum2;
c.seq1 = new boolean[] {true, false, true, false};
c.seq2 = new byte[] {(byte) 1, (byte) 2, (byte) 3, (byte) 4};
Expand Down Expand Up @@ -646,11 +646,11 @@ public void run(String[] args) {
java.util.Map<String, MyClass> dict = new java.util.HashMap<>();
MyClass c;
c = new MyClass();
c.s = new SmallStruct();
c.s = new LargeStruct();
c.s.e = MyEnum.enum2;
dict.put("key1", c);
c = new MyClass();
c.s = new SmallStruct();
c.s = new LargeStruct();
c.s.e = MyEnum.enum3;
dict.put("key2", c);
out = new OutputStream(communicator);
Expand Down
Loading

0 comments on commit 0ab81ae

Please sign in to comment.