1 module dunit.attributes;
2 
3 import std.system : OS;
4 
5 enum AfterEach;
6 enum AfterAll;
7 enum BeforeEach;
8 enum BeforeAll;
9 enum Test;
10 
11 struct Disabled
12 {
13     string reason;
14 }
15 
16 struct Tag
17 {
18     string name;
19 }
20 
21 struct EnabledIf
22 {
23     bool function() condition;
24     string reason;
25 }
26 
27 struct DisabledIf
28 {
29     bool function() condition;
30     string reason;
31 }
32 
33 struct EnabledIfEnvironmentVariable
34 {
35     string named;
36     string matches = ".*";
37 }
38 
39 struct DisabledIfEnvironmentVariable
40 {
41     string named;
42     string matches = ".*";
43 }
44 
45 struct EnabledOnOs
46 {
47     OS[] value;
48 
49     this(OS[] value...)
50     {
51         this.value = value;
52     }
53 }
54 
55 struct DisabledOnOs
56 {
57     OS[] value;
58 
59     this(OS[] value...)
60     {
61         this.value = value;
62     }
63 }
64 
65 deprecated("use AfterEach instead") alias After = AfterEach;
66 deprecated("use AfterAll instead") alias AfterClass = AfterAll;
67 deprecated("use BeforeEach instead") alias Before = BeforeEach;
68 deprecated("use BeforeAll instead") alias BeforeClass = BeforeAll;
69 deprecated("use Disabled instead") alias Ignore = Disabled;