forked from as-pect/as-pect
-
Notifications
You must be signed in to change notification settings - Fork 1
/
LogValue.ts
49 lines (41 loc) 路 1.11 KB
/
LogValue.ts
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
import { ILogTarget } from "./ILogTarget";
/**
* A virtual representation of a discrete value logged to from AssemblyScript.
*/
export class LogValue {
/**
* If a pointer is referenced, this is the precise memory location of the referenced block of
* data.
*/
public pointer: number = 0;
/**
* If a pointer is referenced and isn't a string, this is the size of the referenced block of
* data.
*/
public offset: number = 0;
/**
* If a pointer is referenced and ins't a string, this is an array of bytes to be logged byt the
* logger.
*/
public bytes: number[] = [];
/**
* If an array is referenced, it's values will be here.
*/
public values: number[] = [];
/**
* This is a message generated by the TestSuite to be displayed in the logger.
*/
public message: string = "";
/**
* This is the relevant stack trace, filtered with the `/wasm/i` regex.
*/
public stack: string = "";
/**
* This is the referenced log target.
*/
public target: ILogTarget | null = null;
/**
* This is the raw logged value.
*/
public value: number | null = null;
}