-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCallStackTests.hx
More file actions
39 lines (32 loc) · 854 Bytes
/
Copy pathCallStackTests.hx
File metadata and controls
39 lines (32 loc) · 854 Bytes
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
package;
import utest.Assert;
class CallStackTests extends utest.Test {
function testCallStack() {
var stack = haxe.CallStack.callStack();
Assert.equals(0, stack.length);
}
function testExceptionStack() {
var stack = haxe.CallStack.exceptionStack();
Assert.equals(0, stack.length);
var stackFull = haxe.CallStack.exceptionStack(true);
Assert.equals(0, stackFull.length);
}
function testToString() {
var stack = haxe.CallStack.callStack();
Assert.equals("", haxe.CallStack.toString(stack));
}
function testCopy() {
var stack = haxe.CallStack.callStack();
Assert.equals(0, stack.copy().length);
}
function testInCatch() {
var len = 0;
try {
throw new haxe.Exception("test");
} catch (e:haxe.Exception) {
var eStack = haxe.CallStack.exceptionStack();
len = eStack.length;
}
Assert.equals(0, len);
}
}