/trunk/Examples/test-suite/d/apply_strings_runme.1.d

# · D · 12 lines · 9 code · 3 blank · 0 comment · 5 complexity · 155556785288576ffc33fdbf17482ba8 MD5 · raw file

  1. module apply_strings_runme;
  2. import apply_strings.apply_strings;
  3. const char[] TEST_MESSAGE = "A message from target language to the C++ world and back again.";
  4. void main() {
  5. if (UCharFunction(TEST_MESSAGE) != TEST_MESSAGE) throw new Exception("UCharFunction failed");
  6. if (SCharFunction(TEST_MESSAGE) != TEST_MESSAGE) throw new Exception("SCharFunction failed");
  7. auto pChar = CharFunction(null);
  8. if (pChar !is null) throw new Exception("CharFunction failed");
  9. }