Skip to content

Commit dead37f

Browse files
committed
Add nested namespace tests
Refs #768
1 parent 5990b30 commit dead37f

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

test/SIM_swig_template_scoping/models/Classes.hh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,48 @@ namespace prime {
138138
// prime::Onion::InnerOnion<bool> layer2;
139139
// ::prime::Onion::InnerOnion<short> layer4;
140140
};
141+
142+
// Same tests as above, but within a nested namespace.
143+
namespace nested {
144+
class Corn {
145+
::Foo<peer::Leek> fooLeek;
146+
147+
peer::Bar<Foo<long>> barFoo;
148+
::peer::Bar<peer::Leek> barLeek;
149+
150+
peer::Leek::Eggplant<long> eggplantLong;
151+
::peer::Leek::Eggplant<peer::Leek> eggplantLeek;
152+
153+
peer::nested::Broccoli<long> broccoliLong;
154+
::peer::nested::Broccoli<peer::Leek> broccoliLeek;
155+
156+
peer::nested::Carrot::Celery<long> celeryLong;
157+
::peer::nested::Carrot::Celery<peer::Leek> celeryLeek;
158+
159+
prime::Potato<long> potatoLong;
160+
::prime::Potato<peer::Leek> potatoLeek;
161+
162+
prime::Turnip::Radish<long> radishLong;
163+
::prime::Turnip::Radish<peer::Leek> radishLeek;
164+
165+
prime::nested::Baz<long> bazLong;
166+
::prime::nested::Baz<peer::Leek> bazLeek;
167+
168+
prime::nested::Artichoke::Asparagus<long> asparagusLong;
169+
::prime::nested::Artichoke::Asparagus<peer::Leek> asparagusLeek;
170+
171+
// These fail in Onion, but work here because Onion has already been processed.
172+
prime::Onion::InnerOnion<long> onionLong;
173+
::prime::Onion::InnerOnion<peer::Leek> onionLeek;
174+
175+
// These fail for the same reason as in Onion.
176+
// Foo<float> fooFloat;
177+
// Turnip::Radish<float> radishFloat;
178+
// nested::Baz<float> bazFloat;
179+
// nested::Artichoke::Asparagus<float> asparagusFloat;
180+
// Onion::InnerOnion<float> innerOnionFloat;
181+
};
182+
}
141183
}
142184

143185
#endif

0 commit comments

Comments
 (0)