PageRenderTime 47ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
D | 39 lines | 30 code | 9 blank | 0 comment | 14 complexity | b08579cd845f3a12b159660f728a22cf MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. module special_variable_macros_runme;
  2. import special_variable_macros.special_variable_macros;
  3. import special_variable_macros.Name;
  4. import special_variable_macros.NewName;
  5. import special_variable_macros.PairIntBool;
  6. void main() {
  7. auto name = new Name();
  8. if (testFred(name) != "none") {
  9. throw new Exception("test failed");
  10. }
  11. if (testJack(name) != "$specialname") {
  12. throw new Exception("test failed");
  13. }
  14. if (testJill(name) != "jilly") {
  15. throw new Exception("test failed");
  16. }
  17. if (testMary(name) != "SWIGTYPE_p_NameWrap") {
  18. throw new Exception("test failed");
  19. }
  20. if (testJim(name) != "multiname num") {
  21. throw new Exception("test failed");
  22. }
  23. if (testJohn(new PairIntBool(10, false)) != 123) {
  24. throw new Exception("test failed");
  25. }
  26. auto newName = NewName.factory("factoryname");
  27. if (newName.getStoredName().getName() != "factoryname") {
  28. throw new Exception("test failed");
  29. }
  30. }