summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorJose <pepone@users.noreply.github.com>2021-05-24 19:10:30 +0200
committerGitHub <noreply@github.com>2021-05-24 19:10:30 +0200
commitd237ef3c6ebc462b7ed1fa67c1ef7d987c112f65 (patch)
tree7e2a158a22cd04cf228a2915d226e2fc1f419304 /cpp/test
parentRemove eclipse project files (diff)
downloadice-d237ef3c6ebc462b7ed1fa67c1ef7d987c112f65.tar.bz2
ice-d237ef3c6ebc462b7ed1fa67c1ef7d987c112f65.tar.xz
ice-d237ef3c6ebc462b7ed1fa67c1ef7d987c112f65.zip
Fix reading of interface by value in JavaScript (#1278)
Fixes #1271
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/objects/AllTests.cpp9
-rw-r--r--cpp/test/Ice/objects/Test.ice7
-rw-r--r--cpp/test/Ice/objects/TestI.cpp6
-rw-r--r--cpp/test/Ice/objects/TestI.h2
4 files changed, 24 insertions, 0 deletions
diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp
index c84b73d51a9..437e3bcfef5 100644
--- a/cpp/test/Ice/objects/AllTests.cpp
+++ b/cpp/test/Ice/objects/AllTests.cpp
@@ -624,5 +624,14 @@ allTests(Test::TestHelper* helper)
}
cout << "ok" << endl;
+ cout << "testing class with interface by value member... " << flush;
+ {
+ i = initial->getI();
+ NPtr n = ICE_MAKE_SHARED(N);
+ n->i = i;
+ n = initial->opN(n);
+ }
+ cout << "ok" << endl;
+
return initial;
}
diff --git a/cpp/test/Ice/objects/Test.ice b/cpp/test/Ice/objects/Test.ice
index a89b9beb0e8..e89ad934f14 100644
--- a/cpp/test/Ice/objects/Test.ice
+++ b/cpp/test/Ice/objects/Test.ice
@@ -96,6 +96,11 @@ class H implements I
{
}
+class N
+{
+ I i;
+}
+
sequence<Base> BaseSeq;
class CompactExt;
@@ -261,6 +266,8 @@ interface Initial
F2* opF2(F2* f21, out F2* f22);
bool hasF3();
F3 opF3(F3 f31, out F3 f32);
+
+ N opN(N p1);
}
interface TestIntf
diff --git a/cpp/test/Ice/objects/TestI.cpp b/cpp/test/Ice/objects/TestI.cpp
index abf4154e59e..a16eab14074 100644
--- a/cpp/test/Ice/objects/TestI.cpp
+++ b/cpp/test/Ice/objects/TestI.cpp
@@ -431,3 +431,9 @@ InitialI::hasF3(const Ice::Current&)
{
return true;
}
+
+Test::NPtr
+InitialI::opN(ICE_IN(Test::NPtr) p1, const ::Ice::Current&)
+{
+ return p1;
+}
diff --git a/cpp/test/Ice/objects/TestI.h b/cpp/test/Ice/objects/TestI.h
index 78874dbb91b..30a99154637 100644
--- a/cpp/test/Ice/objects/TestI.h
+++ b/cpp/test/Ice/objects/TestI.h
@@ -151,6 +151,8 @@ public:
virtual Test::F3Ptr opF3(ICE_IN(Test::F3Ptr), Test::F3Ptr&, const Ice::Current&);
virtual bool hasF3(const Ice::Current&);
+ virtual Test::NPtr opN(ICE_IN(Test::NPtr), const ::Ice::Current&);
+
private:
Ice::ObjectAdapterPtr _adapter;