1
1
import compiler
2
+ import glance
2
3
import gleeunit/should
3
4
4
5
pub fn single_byte_case_test ( ) {
5
6
"pub fn main() {
6
7
<<16>>
7
8
}
8
9
"
9
- |> compiler . compile
10
+ |> glance . module
10
11
|> should . be_ok
12
+ |> compiler . compile_module
11
13
|> should . equal (
12
14
"from gleam_builtins import *
13
15
@@ -21,8 +23,9 @@ pub fn multiple_bytes_case_test() {
21
23
<<16, 42, 255>>
22
24
}
23
25
"
24
- |> compiler . compile
26
+ |> glance . module
25
27
|> should . be_ok
28
+ |> compiler . compile_module
26
29
|> should . equal (
27
30
"from gleam_builtins import *
28
31
@@ -36,8 +39,9 @@ pub fn two_byte_integers_test() {
36
39
<<62_000:16, 63_000:16>>
37
40
}
38
41
"
39
- |> compiler . compile
42
+ |> glance . module
40
43
|> should . be_ok
44
+ |> compiler . compile_module
41
45
|> should . equal (
42
46
"from gleam_builtins import *
43
47
@@ -52,8 +56,9 @@ pub fn size_expression_test() {
52
56
<<62_000:size(x)>>
53
57
}
54
58
"
55
- |> compiler . compile
59
+ |> glance . module
56
60
|> should . be_ok
61
+ |> compiler . compile_module
57
62
|> should . equal (
58
63
"from gleam_builtins import *
59
64
@@ -68,8 +73,9 @@ pub fn little_endian_test() {
68
73
<<4_666_000:32-little>>
69
74
}
70
75
"
71
- |> compiler . compile
76
+ |> glance . module
72
77
|> should . be_ok
78
+ |> compiler . compile_module
73
79
|> should . equal (
74
80
"from gleam_builtins import *
75
81
@@ -83,8 +89,9 @@ pub fn big_endian_test() {
83
89
<<4_666_000:32-big>>
84
90
}
85
91
"
86
- |> compiler . compile
92
+ |> glance . module
87
93
|> should . be_ok
94
+ |> compiler . compile_module
88
95
|> should . equal (
89
96
"from gleam_builtins import *
90
97
@@ -98,8 +105,9 @@ pub fn native_endian_test() {
98
105
<<4_666_000:32-native>>
99
106
}
100
107
"
101
- |> compiler . compile
108
+ |> glance . module
102
109
|> should . be_ok
110
+ |> compiler . compile_module
103
111
|> should . equal (
104
112
"from gleam_builtins import *
105
113
@@ -113,8 +121,9 @@ pub fn size_unit_test() {
113
121
<<64_003:2-unit(8)>>
114
122
}
115
123
"
116
- |> compiler . compile
124
+ |> glance . module
117
125
|> should . be_ok
126
+ |> compiler . compile_module
118
127
|> should . equal (
119
128
"from gleam_builtins import *
120
129
@@ -128,8 +137,9 @@ pub fn float_default_double_test() {
128
137
<<64.888889:float>>
129
138
}
130
139
"
131
- |> compiler . compile
140
+ |> glance . module
132
141
|> should . be_ok
142
+ |> compiler . compile_module
133
143
|> should . equal (
134
144
"from gleam_builtins import *
135
145
@@ -143,8 +153,9 @@ pub fn float_explicit_double_test() {
143
153
<<64.888889:64-float>>
144
154
}
145
155
"
146
- |> compiler . compile
156
+ |> glance . module
147
157
|> should . be_ok
158
+ |> compiler . compile_module
148
159
|> should . equal (
149
160
"from gleam_builtins import *
150
161
@@ -158,8 +169,9 @@ pub fn float_explicit_single_test() {
158
169
<<64.888889:32-float>>
159
170
}
160
171
"
161
- |> compiler . compile
172
+ |> glance . module
162
173
|> should . be_ok
174
+ |> compiler . compile_module
163
175
|> should . equal (
164
176
"from gleam_builtins import *
165
177
@@ -173,8 +185,9 @@ pub fn float_single_little_test() {
173
185
<<64.888889:32-float>>
174
186
}
175
187
"
176
- |> compiler . compile
188
+ |> glance . module
177
189
|> should . be_ok
190
+ |> compiler . compile_module
178
191
|> should . equal (
179
192
"from gleam_builtins import *
180
193
@@ -188,8 +201,9 @@ pub fn explicit_int_test() {
188
201
<<42:int>>
189
202
}
190
203
"
191
- |> compiler . compile
204
+ |> glance . module
192
205
|> should . be_ok
206
+ |> compiler . compile_module
193
207
|> should . equal (
194
208
"from gleam_builtins import *
195
209
@@ -206,8 +220,9 @@ pub fn bitstring_test() {
206
220
<<<<3>>:bit_string>>
207
221
}
208
222
"
209
- |> compiler . compile
223
+ |> glance . module
210
224
|> should . be_ok
225
+ |> compiler . compile_module
211
226
|> should . equal (
212
227
"from gleam_builtins import *
213
228
@@ -221,8 +236,9 @@ pub fn u8_test() {
221
236
<<\" hello\" :utf8>>
222
237
}
223
238
"
224
- |> compiler . compile
239
+ |> glance . module
225
240
|> should . be_ok
241
+ |> compiler . compile_module
226
242
|> should . equal (
227
243
"from gleam_builtins import *
228
244
@@ -236,8 +252,9 @@ pub fn u16_test() {
236
252
<<\" hello\" :utf16>>
237
253
}
238
254
"
239
- |> compiler . compile
255
+ |> glance . module
240
256
|> should . be_ok
257
+ |> compiler . compile_module
241
258
|> should . equal (
242
259
"from gleam_builtins import *
243
260
@@ -251,8 +268,9 @@ pub fn u32_test() {
251
268
<<\" hello\" :utf32>>
252
269
}
253
270
"
254
- |> compiler . compile
271
+ |> glance . module
255
272
|> should . be_ok
273
+ |> compiler . compile_module
256
274
|> should . equal (
257
275
"from gleam_builtins import *
258
276
@@ -266,8 +284,9 @@ pub fn u32_little_test() {
266
284
<<\" hello\" :utf32-little>>
267
285
}
268
286
"
269
- |> compiler . compile
287
+ |> glance . module
270
288
|> should . be_ok
289
+ |> compiler . compile_module
271
290
|> should . equal (
272
291
"from gleam_builtins import *
273
292
0 commit comments