summaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/special_variable_macros_runme.1.d
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/d/special_variable_macros_runme.1.d')
-rw-r--r--Examples/test-suite/d/special_variable_macros_runme.1.d39
1 files changed, 39 insertions, 0 deletions
diff --git a/Examples/test-suite/d/special_variable_macros_runme.1.d b/Examples/test-suite/d/special_variable_macros_runme.1.d
new file mode 100644
index 000000000..12491eef5
--- /dev/null
+++ b/Examples/test-suite/d/special_variable_macros_runme.1.d
@@ -0,0 +1,39 @@
+module special_variable_macros_runme;
+
+import special_variable_macros.special_variable_macros;
+import special_variable_macros.Name;
+import special_variable_macros.NewName;
+import special_variable_macros.PairIntBool;
+
+void main() {
+ auto name = new Name();
+
+ if (testFred(name) != "none") {
+ throw new Exception("test failed");
+ }
+
+ if (testJack(name) != "$specialname") {
+ throw new Exception("test failed");
+ }
+
+ if (testJill(name) != "jilly") {
+ throw new Exception("test failed");
+ }
+
+ if (testMary(name) != "SWIGTYPE_p_NameWrap") {
+ throw new Exception("test failed");
+ }
+
+ if (testJim(name) != "multiname num") {
+ throw new Exception("test failed");
+ }
+
+ if (testJohn(new PairIntBool(10, false)) != 123) {
+ throw new Exception("test failed");
+ }
+
+ auto newName = NewName.factory("factoryname");
+ if (newName.getStoredName().getName() != "factoryname") {
+ throw new Exception("test failed");
+ }
+}