forked from romacher/morse-decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
309 lines (258 loc) · 39.9 KB
/
test.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
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
const { expect } = require('chai');
const { decode } = require('./src/index.js');
describe("Easy", function() {
it("Sentence test 1", function() {
const expr = "00101010100000000010001011101000101110100000111111**********00001011110000111111000010111000101110100000111010";
const result = "hello world";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 2", function() {
const expr = "000000001100101010100000000010**********00111110110000101011000000101000111011100000111011**********00111010100000101110000011111100001011110000001110**********001010111000001111110011101011**********00101111110000101011000000111100101111100000101010**********0000111111001010101100000000100000101110**********000000001100101010100000000010**********0010111010000000101100111110100011101111**********000011101000001111110000111110";
const result = "the quick brown fox jumps over the lazy dog";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 3", function() {
const expr = "0000101110000011111100101110100010111010000000101000000011100000111110**********00001010100011101110000011111100101111100000000010**********000010101000111011100010101010000011111100001111110010111010";
const result = "rolling scope school";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 4", function() {
const expr = "0000101110000011111100000010110000111010**********00000000110000111111**********00101111100000101110000011111100001111100000101110000000101100000011110000001111000000101000000011100000111110";
const result = "road to programming";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 5", function() {
const expr = "0000101010000011111100000011110000000010000011111100000011100000000010**********00001011100000000010000000101100001110100000101010**********0000000011001010101000000010100000101010";
const result = "someone reads this";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 6", function() {
const expr = "001010101000000000100011101111**********001110111100001111110000101011**********0010101010000000001000101110100010111110**********00000011110000000010";
const result = "hey you help me";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 7", function() {
const expr = "0000000011001010101000000000100011101111**********0000111011000000001000000000100010111110**********00000011110000000010**********00000010100000001110**********000000001100101010100000000010**********00111010100000001011000010101000000000100000001111000000001000000011100000000011";
const result = "they keep me in the basement";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 8", function() {
const expr = "0000101010000000101100101010110000000010**********00000011110000000010";
const result = "save me";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 9", function() {
const expr = "0011101110000000101100101110100010111010**********000000001100101010100000000010**********001011111000001111110010111010000000101000111011100000000010";
const result = "call the police";
expect(decode(expr)).to.equal(result);
});
it("Sentence test 10", function() {
const expr = "000000101100000011100000101010000010111100000000100000101110**********00001111110000001110**********000000001100101010100000000010**********00001010110010111010000000001100000010100000001111000000101100000000110000000010**********00111110110000101011000000001000001010100000000011000000101000001111110000001110**********00001111110010101110**********0010111010000000101000101011100000000010**********000000001100101010100000000010**********00001010110000001110000000101000101010110000000010000010111000001010100000000010**********000000101100000011100000111010**********0000000010001010101100000000100000101110001110111100000000110010101010000000101000000011100000111110**********00000010100000101010**********10101010111010111111";
const result = "answer on the ultimate question of life the universe and everything is 42";
expect(decode(expr)).to.equal(result);
});
});
describe("Medium", function() {
it("Medium line length test 1", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010";
const result = "ed3ca775";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 2", function() {
const expr = "11111110101010111111111111111000111010101010101011001110101011111110100011101110";
const result = "829b4b8c";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 3", function() {
const expr = "11111111110000000010101010101011111111101110101010101011111111111111111111111111";
const result = "0e596200";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 4", function() {
const expr = "10111111111111101010001110101000101011101010111111101010101011111111101110101010";
const result = "17bf2596";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 5", function() {
const expr = "00111010101010111111111110101000001110101111111111001110111010101010100011101110";
const result = "b27d0c5c";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 6", function() {
const expr = "00001110101010101111000011101000000000101111111010000000001000000010110011101110";
const result = "d3de8eac";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 7", function() {
const expr = "11111111110000001011101111111110101010111010101010001110111010101010110010101110";
const result = "0a145c4f";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 8", function() {
const expr = "10101111111010101010001110101010101011111011111111000000101111101010101010101111";
const result = "25b31a63";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 9", function() {
const expr = "00000000101010111111000000001000111010100010101110101010111110101010111111111111";
const result = "e2ebf340";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 10", function() {
const expr = "00111011101010101011101010111110101011111010101010000000101111111110101010111111";
const result = "c4335a82";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 11", function() {
const expr = "11101010100011101110101010101110101010111010101111000000001000111011100000000010";
const result = "6c443ece";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 12", function() {
const expr = "00000010111110101010111111111111101010101111111110001010111010101010101111111111";
const result = "a6069f50";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 13", function() {
const expr = "00000010111111111010101010111111101010100010101110000011101000111011101010101111";
const result = "a836fdc3";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 14", function() {
const expr = "10101010100011101110001110111011101010100011101110101011111100000010111111111110";
const result = "5cc6c2a9";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 15", function() {
const expr = "10101010110011101110000011101000101011101010101010000011101000000010111111111111";
const result = "4cdf5da0";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 16", function() {
const expr = "00101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 17", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010";
const result = "ed3ca775";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 18", function() {
const expr = "11111110101010111111111111111000111010101010101011001110101011111110100011101110";
const result = "829b4b8c";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 19", function() {
const expr = "11111111110000000010101010101011111111101110101010101011111111111111111111111111";
const result = "0e596200";
expect(decode(expr)).to.equal(result);
});
it("Medium line length test 20", function() {
const expr = "10111111111111101010001110101000101011101010111111101010101011111111101110101010";
const result = "17bf2596";
expect(decode(expr)).to.equal(result);
});
});
describe("Hard (what's going on)", function() {
it("Awesome line length test 1", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 2", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 3", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 4", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 5", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 6", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 7", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 8", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 9", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 10", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 11", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 12", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 13", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 14", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 15", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 16", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 17", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 18", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 19", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
it("Awesome line length test 20", function() {
const expr = "00000000100000111010101010111100111011100000001011111110101011111010101010101010111111101010101111111111111110001110101010101010110011101010111111101000111011101111111111000000001010101010101111111110111010101010101111111111111111111111111110111111111111101010001110101000101011101010111111101010101011111111101110101010001110101010101111111111101010000011101011111111110011101110101010101000111011100000111010101010111100001110100000000010111111101000000000100000001011001110111011111111110000001011101111111110101010111010101010001110111010101010110010101110101011111110101010100011101010101010111110111111110000001011111010101010101011110000000010101011111100000000100011101010001010111010101011111010101011111111111100111011101010101011101010111110101011111010101010000000101111111110101010111111111010101000111011101010101011101010101110101011110000000010001110111000000000100000001011111010101011111111111110101010111111111000101011101010101010111111111100000010111111111010101010111111101010100010101110000011101000111011101010101111101010101000111011100011101110111010101000111011101010111111000000101111111111101010101011001110111000001110100010101110101010101000001110100000001011111111111100101011100011101010101010111100111010101110101010000000101100111011100011101010";
const result = "ed3ca775829b4b8c0e59620017bf2596b27d0c5cd3de8eac0a145c4f25b31a63e2ebf340c4335a826c443ecea6069f50a836fdc35cc6c2a94cdf5da0fb3b6acb";
expect(decode(expr)).to.equal(result);
});
})