/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
- module special_variable_macros_runme;
- import special_variable_macros.special_variable_macros;
- import special_variable_macros.Name;
- import special_variable_macros.NewName;
- import special_variable_macros.PairIntBool;
- void main() {
- auto name = new Name();
- if (testFred(name) != "none") {
- throw new Exception("test failed");
- }
- if (testJack(name) != "$specialname") {
- throw new Exception("test failed");
- }
- if (testJill(name) != "jilly") {
- throw new Exception("test failed");
- }
- if (testMary(name) != "SWIGTYPE_p_NameWrap") {
- throw new Exception("test failed");
- }
- if (testJim(name) != "multiname num") {
- throw new Exception("test failed");
- }
- if (testJohn(new PairIntBool(10, false)) != 123) {
- throw new Exception("test failed");
- }
- auto newName = NewName.factory("factoryname");
- if (newName.getStoredName().getName() != "factoryname") {
- throw new Exception("test failed");
- }
- }