-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
blocks.re
35 lines (34 loc) 路 946 Bytes
/
blocks.re
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
open Grain_tests.TestFramework;
open Grain_tests.Runner;
open Grain_middle_end.Anftree;
open Grain_middle_end.Anf_helper;
open Grain_utils.Warnings;
describe("blocks", ({test}) => {
let assertParse = makeParseRunner(test);
Grain_parsing.(
Ast_helper.(
assertParse(
"block_parse_lone_no_args_enum",
"module Test; { Foo }",
{
attributes: Grain_tests.Test_utils.default_module_attributes,
module_name: Location.mknoloc("Test"),
statements: [
Toplevel.expr(
Expression.block([
Expression.singleton_construct(
~loc=Location.dummy_loc,
Location.mknoloc(
Identifier.IdentName(Location.mknoloc("Foo")),
),
),
]),
),
],
comments: [],
prog_loc: Location.dummy_loc,
},
)
)
);
});