PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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. }