Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross tests #2070

Merged
merged 3 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ jobs:
# Cross tests
- os: ubuntu-22.04
config: "cross"
# These cross tests are currently failing
test_flags: "--all-cross --rfilter Ice/invoke --rfilter Ice/optional --rfilter Ice/slicing"
test_flags: "--all-cross"

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion cpp/test/Ice/invoke/BlobjectI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ invokeInternal(InputStream& in, vector<byte>& outEncaps, const Current& current)
in.startEncapsulation();
in.read(s);
in.endEncapsulation();
if (s == "::MyClass")
if (s == "::Test::MyClass")
{
out.write(true);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/test/Ice/optional/TestAMDI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,5 +553,5 @@ InitialI::supportsCsharpSerializableAsync(
void
InitialI::supportsNullOptionalAsync(function<void(bool)> response, function<void(exception_ptr)>, const Ice::Current&)
{
response(true);
response(false);
}
2 changes: 1 addition & 1 deletion cpp/test/Ice/optional/TestI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,5 @@ InitialI::supportsCsharpSerializable(const Ice::Current&)
bool
InitialI::supportsNullOptional(const Ice::Current&)
{
return true;
return false;
}
3 changes: 0 additions & 3 deletions csharp/test/Ice/optional/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,9 @@ public class AllTests : global::Test.AllTests
owc1.l.Value.Add(new Test.SmallStruct(5));
owc1.l.Value.Add(new Test.SmallStruct(6));
owc1.l.Value.Add(new Test.SmallStruct(7));
owc1.s = new Test.ClassVarStruct(5);
Test.OptionalWithCustom owc2 = (Test.OptionalWithCustom)initial.pingPong(owc1);
test(owc2.l.HasValue);
test(ListsEqual(owc1.l.Value, owc2.l.Value));
test(owc2.s.HasValue);
test(owc2.s.Value.a == 5);
}

//
Expand Down
7 changes: 0 additions & 7 deletions csharp/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ struct VarStruct
string m;
}

["cs:class"]
struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +153,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
7 changes: 0 additions & 7 deletions csharp/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ struct VarStruct
string m;
}

["cs:class"]
struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +153,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
23 changes: 8 additions & 15 deletions csharp/test/Ice/slicing/objects/AllTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2168,26 +2168,19 @@ public static TestIntfPrx allTests(Test.TestHelper helper, bool collocated)
//
// ex.slicedData_.obj.iceSlicedData_.obj
//
test(PreservedI.counter == 0);

try
{
test(PreservedI.counter == 0);

try
{
testPrx.throwPreservedException();
}
catch (PreservedException)
{
test(PreservedI.counter == 1);
}

PreservedI.counter = 0;
testPrx.throwPreservedException();
}
catch (Exception ex)
catch (PreservedException)
{
output.WriteLine(ex.ToString());
test(false);
test(PreservedI.counter == 1);
}

PreservedI.counter = 0;

}
catch (Ice.OperationNotExistException)
{
Expand Down
3 changes: 0 additions & 3 deletions java/test/src/main/java/test/Ice/optional/AllTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,9 @@ public static InitialPrx allTests(test.TestHelper helper, boolean collocated) {
l.add(new SmallStruct((byte) 6));
l.add(new SmallStruct((byte) 7));
owc1.setL(l);
owc1.setS(new ClassVarStruct(5));
OptionalWithCustom owc2 = (OptionalWithCustom) initial.pingPong(owc1);
test(owc2.hasL());
test(owc2.getL().equals(l));
test(owc2.hasS());
test(owc2.getS().a == 5);
}

//
Expand Down
6 changes: 0 additions & 6 deletions java/test/src/main/java/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -160,7 +155,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions java/test/src/main/java/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -160,7 +155,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
18 changes: 7 additions & 11 deletions java/test/src/main/java/test/Ice/slicing/objects/AllTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -2165,19 +2165,15 @@ public static TestIntfPrx allTests(test.TestHelper helper, boolean collocated) {
//
// ex.slicedData.obj.slicedData.obj
//
try {
test(PreservedI.counter == 0);
test(PreservedI.counter == 0);

try {
test.throwPreservedException();
} catch (PreservedException ex) {
test(PreservedI.counter == 1);
}

PreservedI.counter = 0;
} catch (Exception ex) {
test(false);
try {
test.throwPreservedException();
} catch (PreservedException ex) {
test(PreservedI.counter == 1);
}

PreservedI.counter = 0;
} catch (com.zeroc.Ice.OperationNotExistException ex) {
}

Expand Down
6 changes: 0 additions & 6 deletions js/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +154,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions js/test/typescript/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -161,7 +156,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions matlab/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -160,7 +155,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions php/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +154,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions python/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +154,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
6 changes: 0 additions & 6 deletions ruby/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -159,7 +154,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
3 changes: 0 additions & 3 deletions swift/test/Ice/optional/AllTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,9 @@ func allTests(_ helper: TestHelper) throws -> InitialPrx {
do {
let owc1 = OptionalWithCustom()
owc1.l = [SmallStruct(m: 5), SmallStruct(m: 6), SmallStruct(m: 7)]
owc1.s = ClassVarStruct(a: 5)
if let owc2 = try initial.pingPong(owc1) as? OptionalWithCustom {
try test(owc2.l != nil)
try test(owc1.l == owc2.l)
try test(owc2.s != nil)
try test(owc2.s!.a == 5)
} else {
try test(false)
}
Expand Down
6 changes: 0 additions & 6 deletions swift/test/Ice/optional/Test.ice
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ struct VarStruct
string m;
}

struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -163,7 +158,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down
7 changes: 0 additions & 7 deletions swift/test/Ice/optional/TestAMD.ice
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ struct VarStruct
string m;
}

["cs:class"]
struct ClassVarStruct
{
int a;
}

sequence<byte> ByteSeq;
sequence<bool> BoolSeq;
sequence<short> ShortSeq;
Expand Down Expand Up @@ -164,7 +158,6 @@ class OptionalWithCustom
{
optional(1) SmallStructList l;
["protected"] optional(2) SmallStructList lp;
optional(3) ClassVarStruct s;
}

class E
Expand Down