-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMojoTestWindow.xojo_window
138 lines (133 loc) · 3.86 KB
/
MojoTestWindow.xojo_window
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#tag Window
Begin Window MojoTestWindow
BackColor = &cFFFFFF00
Backdrop = 0
CloseButton = True
Compatibility = ""
Composite = False
Frame = 0
FullScreen = False
FullScreenButton= False
HasBackColor = False
Height = 388
ImplicitInstance= True
LiveResize = True
MacProcID = 0
MaxHeight = 32000
MaximizeButton = True
MaxWidth = 32000
MenuBar = 0
MenuBarVisible = True
MinHeight = 64
MinimizeButton = True
MinWidth = 64
Placement = 0
Resizeable = True
Title = "Mojo Tests"
Visible = True
Width = 640
Begin PushButton PushButton1
AutoDeactivate = True
Bold = False
ButtonStyle = "0"
Cancel = False
Caption = "Run Tests"
Default = False
Enabled = True
Height = 20
HelpTag = ""
Index = -2147483648
InitialParent = ""
Italic = False
Left = 540
LockBottom = True
LockedInPosition= False
LockLeft = False
LockRight = True
LockTop = False
Scope = 0
TabIndex = 0
TabPanelIndex = 0
TabStop = True
TextFont = "System"
TextSize = 0.0
TextUnit = 0
Top = 348
Underline = False
Visible = True
Width = 80
End
Begin TextArea TestViewer
AcceptTabs = False
Alignment = 0
AutoDeactivate = True
AutomaticallyCheckSpelling= True
BackColor = &cFFFFFF00
Bold = False
Border = True
DataField = ""
DataSource = ""
Enabled = True
Format = ""
Height = 329
HelpTag = ""
HideSelection = True
Index = -2147483648
Italic = False
Left = 0
LimitText = 0
LineHeight = 0.0
LineSpacing = 1.0
LockBottom = True
LockedInPosition= False
LockLeft = True
LockRight = True
LockTop = True
Mask = ""
Multiline = True
ReadOnly = False
Scope = 0
ScrollbarHorizontal= False
ScrollbarVertical= True
Styled = True
TabIndex = 1
TabPanelIndex = 0
TabStop = True
Text = ""
TextColor = &c00000000
TextFont = "System"
TextSize = 0.0
TextUnit = 0
Top = 0
Underline = False
UseFocusRing = True
Visible = True
Width = 640
End
End
#tag EndWindow
#tag WindowCode
#tag EndWindowCode
#tag Events PushButton1
#tag Event
Sub Action()
dim TestableClasses() as Introspection.TypeInfo = Array(GetTypeInfo(mojo.UUID))
dim tests() as mojo.Test = mojo.Test.RunTests(TestableClasses)
dim result() as String
for each test as mojo.Test in tests()
if test.Passed then
result.Append(test.Name + ": Passed")
else
result.Append(test.Name + ": Failed")
result.Append("Stack trace:")
for each line as String in test.StackTrace
result.Append(line)
next
end if
next
result.Append("-------------------------------------------")
result.Append(EndOfLine)
TestViewer.AppendText(Join(result, EndOfLine))
End Sub
#tag EndEvent
#tag EndEvents