summaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/apply_strings_runme.1.d
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/d/apply_strings_runme.1.d')
-rw-r--r--Examples/test-suite/d/apply_strings_runme.1.d12
1 files changed, 12 insertions, 0 deletions
diff --git a/Examples/test-suite/d/apply_strings_runme.1.d b/Examples/test-suite/d/apply_strings_runme.1.d
new file mode 100644
index 000000000..960caa4ca
--- /dev/null
+++ b/Examples/test-suite/d/apply_strings_runme.1.d
@@ -0,0 +1,12 @@
+module apply_strings_runme;
+
+import apply_strings.apply_strings;
+
+const char[] TEST_MESSAGE = "A message from target language to the C++ world and back again.";
+
+void main() {
+ if (UCharFunction(TEST_MESSAGE) != TEST_MESSAGE) throw new Exception("UCharFunction failed");
+ if (SCharFunction(TEST_MESSAGE) != TEST_MESSAGE) throw new Exception("SCharFunction failed");
+ auto pChar = CharFunction(null);
+ if (pChar !is null) throw new Exception("CharFunction failed");
+}