PageRenderTime 47ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
D | 21 lines | 17 code | 4 blank | 0 comment | 7 complexity | 6e9730fa71f06d10af0f0c6a3c15d515 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 std.exception;
  3. import special_variable_macros.special_variable_macros;
  4. import special_variable_macros.Name;
  5. import special_variable_macros.NewName;
  6. import special_variable_macros.PairIntBool;
  7. void main() {
  8. auto name = new Name();
  9. enforce(testFred(name) == "none");
  10. enforce(testJack(name) == "$specialname");
  11. enforce(testJill(name) == "jilly");
  12. enforce(testMary(name) == "SWIGTYPE_p_NameWrap");
  13. enforce(testJim(name) == "multiname num");
  14. enforce(testJohn(new PairIntBool(10, false)) == 123);
  15. auto newName = NewName.factory("factoryname");
  16. enforce(newName.getStoredName().getName() == "factoryname");
  17. }