summaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/apply_strings_runme.1.d
blob: 960caa4cae8d7cd4c6daa46f68f36acc40a638b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
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");
}