diff options
author | Jose <jose@zeroc.com> | 2018-06-19 14:18:42 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-06-19 14:18:42 +0200 |
commit | c4b96f766a0dba9d6472144f6a05475bb6d6c946 (patch) | |
tree | e3cc326b4305ba0d9ff2aab25bab15410f2f05c9 /cpp/test/Ice/scope/Test.ice | |
parent | slice2cpp generates invalid code wrt namespace qualification (diff) | |
download | ice-c4b96f766a0dba9d6472144f6a05475bb6d6c946.tar.bz2 ice-c4b96f766a0dba9d6472144f6a05475bb6d6c946.tar.xz ice-c4b96f766a0dba9d6472144f6a05475bb6d6c946.zip |
Test for qualified names
Diffstat (limited to 'cpp/test/Ice/scope/Test.ice')
-rw-r--r-- | cpp/test/Ice/scope/Test.ice | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/cpp/test/Ice/scope/Test.ice b/cpp/test/Ice/scope/Test.ice new file mode 100644 index 00000000000..fbd505e2ee4 --- /dev/null +++ b/cpp/test/Ice/scope/Test.ice @@ -0,0 +1,115 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2018 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#pragma once + +module Test +{ + struct S + { + int v; + } + + dictionary<string, S> SMap; + sequence<S> SSeq; + + class C + { + S s; + } + + dictionary<string, C> CMap; + sequence<C> CSeq; + + interface I + { + S opS(S s1, out S s2); + SSeq opSSeq(SSeq s1, out SSeq s2); + SMap opSMap(SMap s1, out SMap s2); + + C opC(C c1, out C c2); + CSeq opCSeq(CSeq s1, out CSeq s2); + CMap opCMap(CMap c1, out CMap c2); + + void shutdown(); + } + + dictionary<string, I*> IMap; + sequence<I*> ISeq; + + module Inner + { + struct S + { + int v; + } + + module Inner2 + { + struct S + { + int v; + } + + dictionary<string, S> SMap; + sequence<S> SSeq; + + class C + { + S s; + } + + dictionary<string, C> CMap; + sequence<C> CSeq; + + interface I + { + S opS(S s1, out S s2); + SSeq opSSeq(SSeq s1, out SSeq s2); + SMap opSMap(SMap s1, out SMap s2); + + C opC(C c1, out C c2); + CSeq opCSeq(CSeq c1, out CSeq c2); + CMap opCMap(CMap c1, out CMap c2); + + void shutdown(); + } + + dictionary<string, I*> IMap; + sequence<I*> ISeq; + } + + class C + { + S s; + } + + sequence<Inner2::S> SSeq; + dictionary<string, Inner2::S> SMap; + + dictionary<string, Inner2::C> CMap; + sequence<Inner2::C> CSeq; + + interface I + { + Inner2::S opS(Inner2::S s1, out Inner2::S s2); + Inner2::SSeq opSSeq(Inner2::SSeq s1, out Inner2::SSeq s2); + Inner2::SMap opSMap(Inner2::SMap s1, out Inner2::SMap s2); + + Inner2::C opC(Inner2::C c1, out Inner2::C c2); + Inner2::CSeq opCSeq(Inner2::CSeq c1, out Inner2::CSeq c2); + Inner2::CMap opCMap(Inner2::CMap c1, out Inner2::CMap c2); + + void shutdown(); + } + + dictionary<string, I*> IMap; + sequence<I*> ISeq; + } +} |