PageRenderTime 38ms CodeModel.GetById 29ms app.highlight 6ms RepoModel.GetById 1ms 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
 1module special_variable_macros_runme;
 2
 3import special_variable_macros.special_variable_macros;
 4import special_variable_macros.Name;
 5import special_variable_macros.NewName;
 6import special_variable_macros.PairIntBool;
 7
 8void main() {
 9  auto name = new Name();
10
11  if (testFred(name) != "none") {
12    throw new Exception("test failed");
13  }
14
15  if (testJack(name) != "$specialname") {
16    throw new Exception("test failed");
17  }
18
19  if (testJill(name) != "jilly") {
20    throw new Exception("test failed");
21  }
22
23  if (testMary(name) != "SWIGTYPE_p_NameWrap") {
24    throw new Exception("test failed");
25  }
26
27  if (testJim(name) != "multiname num") {
28    throw new Exception("test failed");
29  }
30
31  if (testJohn(new PairIntBool(10, false)) != 123) {
32    throw new Exception("test failed");
33  }
34
35  auto newName = NewName.factory("factoryname");
36  if (newName.getStoredName().getName() != "factoryname") {
37    throw new Exception("test failed");
38  }
39}