forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccessor.js
More file actions
56 lines (49 loc) · 2.06 KB
/
accessor.js
File metadata and controls
56 lines (49 loc) · 2.06 KB
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
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hdb --break-at-start < %s.step-in.debug %s | %FileCheck --match-full-lines %s --check-prefix=CHECK-STEP-IN
// RUN: %hdb --break-at-start < %s.step-over.debug %s | %FileCheck --match-full-lines %s --check-prefix=CHECK-STEP-OVER
// RUN: %hdb --break-at-start %s < %s.step.debug | %FileCheck --match-full-lines %s --check-prefix=CHECK-STEP
// RUN: %hdb --break-at-start %s < %s.finish.debug | %FileCheck --match-full-lines %s --check-prefix=CHECK-FINISH
// REQUIRES: debugger
var obj = {
a: 'a',
get aLen() {
print("hello");
return this.a.length;
}
};
var alen = obj.aLen + 1;
print(alen);
// CHECK-STEP-OVER: Break on script load in global: {{.*}}:14:1
// CHECK-STEP-OVER: Stepped to global: {{.*}}:14:11
// CHECK-STEP-OVER: Stepped to global: {{.*}}:22:12
// CHECK-STEP-OVER: hello
// CHECK-STEP-OVER: Stepped to global: {{.*}}:23:1
// CHECK-STEP-OVER: 2
// CHECK-STEP-IN: Break on script load in global: {{.*}}:14:1
// CHECK-STEP-IN: Stepped to global: {{.*}}:14:11
// CHECK-STEP-IN: Stepped to global: {{.*}}:22:12
// CHECK-STEP-IN: Stepped to get aLen: {{.*}}:17:9
// CHECK-STEP-IN: hello
// CHECK-STEP-IN: Stepped to get aLen: {{.*}}:18:20
// CHECK-STEP: Break on script load in global: {{.*}}:14:1
// CHECK-STEP: Set breakpoint 1 at {{.*}}:17:9
// CHECK-STEP: Continuing execution
// CHECK-STEP: Break on breakpoint 1 in get aLen: {{.*}}:17:9
// CHECK-STEP: hello
// CHECK-STEP: Stepped to get aLen: {{.*}}:18:20
// CHECK-STEP: Stepped to global: {{.*}}:22:12
// CHECK-STEP: Stepped to global: {{.*}}:23:1
// CHECK-STEP: 2
// CHECK-FINISH: Break on script load in global: {{.*}}:14:1
// CHECK-FINISH: Set breakpoint 1 at {{.*}}:17:9
// CHECK-FINISH: Continuing execution
// CHECK-FINISH: Break on breakpoint 1 in get aLen: {{.*}}:17:9
// CHECK-FINISH: hello
// CHECK-FINISH: Stepped to global: {{.*}}:22:12
// CHECK-FINISH: Stepped to global: {{.*}}:23:1
// CHECK-FINISH: 2