Skip to content

Commit 1ad5887

Browse files
committed
Update syntax roundtrip tests
1 parent 769e337 commit 1ad5887

File tree

8 files changed

+17
-17
lines changed

8 files changed

+17
-17
lines changed

tests/syntax_tests/data/parsing/grammar/expressions/expected/block.res.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let b =
66
((let open Belt.Array in
77
([|1;2|] -> (map (fun [arity:1]x -> x + 1))) -> Js.log)
88
[@res.braces ])
9-
let b = ((let exception QuitEarly in raise QuitEarly)[@res.braces ])
9+
let b = ((let exception QuitEarly in throw QuitEarly)[@res.braces ])
1010
let b = ((let a = 1 in let b = 2 in a + b)[@res.braces ])
1111
let b = ((let _ = sideEffect () in ())[@res.braces ])
1212
let b = ((let _ = sideEffect () in ())[@res.braces ])
@@ -21,7 +21,7 @@ let b =
2121
let b = 2 in
2222
sideEffect ();
2323
(let x = (1 + 2) -> (fun [arity:1]x -> x + 1) in
24-
raise (Terminate x)))
24+
throw (Terminate x)))
2525
[@res.braces ])
2626
let b = ((f (); g (); h (); (let arr = [|1;2;3|] in ()))[@res.braces ])
2727
let res =
@@ -64,7 +64,7 @@ let reifyStyle (type a) [arity:1](x : 'a) =
6464
if Internal.instanceOf x Internal.canvasPattern
6565
then Obj.magic Pattern
6666
else
67-
raise
67+
throw
6868
(Invalid_argument
6969
{js|Unknown canvas style kind. Known values are: String, CanvasGradient, CanvasPattern|js})),
7070
(Obj.magic x)))

tests/syntax_tests/data/printer/comments/expected/blockExpr.res.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,21 @@ let () = {
9999

100100
let () = {
101101
/* c0 */ exception /* inside */ Exit /* c1 */
102-
/* c2 */ raise(Exit) /* c3 */
102+
/* c2 */ throw(Exit) /* c3 */
103103
}
104104

105105
let () = {
106106
/* c0 */ exception /* inside */ Exit // c1
107107
// k
108108

109109
// k2
110-
/* c2 */ raise(Exit) // c3
110+
/* c2 */ throw(Exit) // c3
111111
}
112112

113113
let () = {
114114
/* c0 */ exception /* inside */ Exit /* c1 */
115115
/* c2 */ exception /* inside */ Terminate /* c3 */
116-
/* c4 */ raise(Exit) /* c5 */
116+
/* c4 */ throw(Exit) /* c5 */
117117
}
118118

119119
let () = {
@@ -129,14 +129,14 @@ let () = {
129129
// k2
130130

131131
// k3
132-
/* c4 */ raise(Exit) /* c5 */
132+
/* c4 */ throw(Exit) /* c5 */
133133
}
134134

135135
let () = {
136136
/* c0 */ exception /* inside */ Exit /* c1 */
137137
/* c2 */ exception /* inside */ Terminate /* c3 */
138138
/* c4 */ exception /* inside */ Oom /* c5 */
139-
/* c6 */ raise(Exit) /* c7 */
139+
/* c6 */ throw(Exit) /* c7 */
140140
}
141141

142142
let () = {

tests/syntax_tests/data/printer/expr/expected/apply.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ f({
9090
f({expr})
9191
f({
9292
exception Exit
93-
raise(Exit)
93+
throw(Exit)
9494
})
9595

9696
resolve()

tests/syntax_tests/data/printer/expr/expected/binary.res.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,16 @@ let x =
363363
let x =
364364
a && {
365365
exception Exit
366-
raise(Exit)
366+
throw(Exit)
367367
}
368368
let x =
369369
a &&
370370
{
371371
exception Exit
372-
raise(Exit)
372+
throw(Exit)
373373
} && {
374374
exception Exit
375-
raise(Exit)
375+
throw(Exit)
376376
}
377377

378378
let x = a && assert(false)

tests/syntax_tests/data/printer/expr/expected/block.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let reifyStyle = (type a, x: 'a): (style<a>, a) => {
3131
} else if Internal.instanceOf(x, Internal.canvasPattern) {
3232
Obj.magic(Pattern)
3333
} else {
34-
raise(
34+
throw(
3535
Invalid_argument(
3636
"Unknown canvas style kind. Known values are: String, CanvasGradient, CanvasPattern",
3737
),

tests/syntax_tests/data/printer/expr/expected/constructor.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ let first = Some({
117117

118118
let first = Some({
119119
exception Exit
120-
raise(Exit)
120+
throw(Exit)
121121
})
122122

123123
let first = Some({

tests/syntax_tests/data/printer/expr/expected/jsx.res.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ let x =
190190
}
191191
letException={
192192
exception Exit
193-
raise(Exit)
193+
throw(Exit)
194194
}
195195
assertExpr={assert(true)}
196196
pack=module(Foo)
@@ -269,7 +269,7 @@ let x =
269269
}
270270
{
271271
exception Exit
272-
raise(Exit)
272+
throw(Exit)
273273
}
274274
{assert(true)}
275275
{module(Foo)}

tests/syntax_tests/data/printer/expr/expected/ternary.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ let () = condition
217217
}
218218
: {
219219
exception Exit
220-
raise(Exit)
220+
throw(Exit)
221221
}
222222
let () = condition ? foo() : assert(false)
223223

0 commit comments

Comments
 (0)