forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lazy-break.js
27 lines (24 loc) · 920 Bytes
/
lazy-break.js
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
// 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 --lazy %s < %s.debug | %FileCheck --match-full-lines %s
// REQUIRES: debugger
function foo() {
print('foo called');
/* Some text to pad out the function so that it won't be eagerly compiled
* for being too short. Lorem ipsum dolor sit amet, consectetur adipiscing
* elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
*/
}
debugger;
foo();
// CHECK: Break on 'debugger' statement in global: {{.*}}[1]:17:1
// CHECK-NEXT: Set breakpoint 1 at {{.*}}:10:3
// CHECK-NEXT: 1 E {{.*}}:10:3
// CHECK-NEXT: Continuing execution
// CHECK-NEXT: Break on breakpoint 1 in foo: {{.*}}lazy-break.js[1]:10:3
// CHECK-NEXT: 1 E {{.*}}:10:3
// CHECK-NEXT: Continuing execution
// CHECK-NEXT: foo called