summaryrefslogtreecommitdiff
path: root/test/lit/exec/strings.wast
blob: f4ba59844d815ba9f189609140de379a5428ad6b (plain)
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
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.

;; RUN: wasm-opt %s -all --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s

(module
  (type $array16 (array (mut i16)))

  (import "fuzzing-support" "log-i32" (func $log (param i32)))

  (memory 1 1)

  ;; CHECK:      [fuzz-exec] calling new_wtf16_array
  ;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello")
  (func $new_wtf16_array (export "new_wtf16_array") (result stringref)
    (string.new_wtf16_array
      (array.new_fixed $array16 5
        (i32.const 104) ;; h
        (i32.const 101) ;; e
        (i32.const 108) ;; l
        (i32.const 108) ;; l
        (i32.const 111) ;; o
      )
      (i32.const 1) ;; start from index 1, to chop off the 'h'
      (i32.const 5)
    )
  )

  ;; CHECK:      [fuzz-exec] calling const
  ;; CHECK-NEXT: [fuzz-exec] note result: const => string("world")
  (func $const (export "const") (result stringref)
    (string.const "world")
  )

  ;; CHECK:      [fuzz-exec] calling eq.1
  ;; CHECK-NEXT: [fuzz-exec] note result: eq.1 => 0
  (func $eq.1 (export "eq.1") (result i32)
    (string.eq
      (string.const "hello")
      (string.const "world")
    )
  )

  ;; CHECK:      [fuzz-exec] calling eq.2
  ;; CHECK-NEXT: [fuzz-exec] note result: eq.2 => 1
  (func $eq.2 (export "eq.2") (result i32)
    (string.eq
      (string.const "hello")
      (string.const "hello")
    )
  )

  ;; CHECK:      [fuzz-exec] calling eq.3
  ;; CHECK-NEXT: [fuzz-exec] note result: eq.3 => 0
  (func $eq.3 (export "eq.3") (result i32)
    (string.eq
      (string.const "hello")
      (ref.null string)
    )
  )

  ;; CHECK:      [fuzz-exec] calling eq.4
  ;; CHECK-NEXT: [fuzz-exec] note result: eq.4 => 0
  (func $eq.4 (export "eq.4") (result i32)
    (string.eq
      (ref.null string)
      (string.const "world")
    )
  )

  ;; CHECK:      [fuzz-exec] calling eq.5
  ;; CHECK-NEXT: [fuzz-exec] note result: eq.5 => 1
  (func $eq.5 (export "eq.5") (result i32)
    (string.eq
      (ref.null string)
      (ref.null string)
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.1
  ;; CHECK-NEXT: [trap null ref]
  (func $compare.1 (export "compare.1") (result i32)
    (string.compare
      (string.const "hello")
      (ref.null string)
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.2
  ;; CHECK-NEXT: [trap null ref]
  (func $compare.2 (export "compare.2") (result i32)
    (string.compare
      (ref.null string)
      (string.const "world")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.3
  ;; CHECK-NEXT: [trap null ref]
  (func $compare.3 (export "compare.3") (result i32)
    (string.compare
      (ref.null string)
      (ref.null string)
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.4
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.4 => 0
  (func $compare.4 (export "compare.4") (result i32)
    (string.compare
      (string.const "hello")
      (string.const "hello")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.5
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.5 => -1
  (func $compare.5 (export "compare.5") (result i32)
    (string.compare
      (string.const "hello")
      (string.const "hezlo")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.6
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.6 => 1
  (func $compare.6 (export "compare.6") (result i32)
    (string.compare
      (string.const "hezlo")
      (string.const "hello")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.7
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.7 => -1
  (func $compare.7 (export "compare.7") (result i32)
    (string.compare
      (string.const "he")
      (string.const "hello")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.8
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.8 => 1
  (func $compare.8 (export "compare.8") (result i32)
    (string.compare
      (string.const "hello")
      (string.const "he")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.9
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.9 => 1
  (func $compare.9 (export "compare.9") (result i32)
    (string.compare
      (string.const "hf")
      (string.const "hello")
    )
  )

  ;; CHECK:      [fuzz-exec] calling compare.10
  ;; CHECK-NEXT: [fuzz-exec] note result: compare.10 => -1
  (func $compare.10 (export "compare.10") (result i32)
    (string.compare
      (string.const "hello")
      (string.const "hf")
    )
  )

  ;; CHECK:      [fuzz-exec] calling get_codeunit
  ;; CHECK-NEXT: [fuzz-exec] note result: get_codeunit => 99
  (func $get_codeunit (export "get_codeunit") (result i32)
    ;; Reads 'c' which is code 99.
    (stringview_wtf16.get_codeunit
      (string.const "abcdefg")
      (i32.const 2)
    )
  )

  ;; CHECK:      [fuzz-exec] calling encode
  ;; CHECK-NEXT: [LoggingExternalInterface logging 3]
  ;; CHECK-NEXT: [LoggingExternalInterface logging 0]
  ;; CHECK-NEXT: [LoggingExternalInterface logging 97]
  ;; CHECK-NEXT: [LoggingExternalInterface logging 98]
  ;; CHECK-NEXT: [LoggingExternalInterface logging 99]
  ;; CHECK-NEXT: [LoggingExternalInterface logging 0]
  (func $encode (export "encode")
    (local $array16 (ref $array16))
    (local.set $array16
      (array.new_default $array16
        (i32.const 10)
      )
    )
    ;; Log out that we wrote 3 things.
    (call $log
      (string.encode_wtf16_array
        (string.const "abc")
        (local.get $array16)
        (i32.const 4)
      )
    )
    ;; We wrote 3 things at offset 4. Log out the values at 3,4,5,6,7 (the first
    ;; and last should be 0, and "abc" in between).
    (call $log
      (array.get $array16
        (local.get $array16)
        (i32.const 3)
      )
    )
    (call $log
      (array.get $array16
        (local.get $array16)
        (i32.const 4)
      )
    )
    (call $log
      (array.get $array16
        (local.get $array16)
        (i32.const 5)
      )
    )
    (call $log
      (array.get $array16
        (local.get $array16)
        (i32.const 6)
      )
    )
    (call $log
      (array.get $array16
        (local.get $array16)
        (i32.const 7)
      )
    )
  )

  ;; CHECK:      [fuzz-exec] calling encode-unsigned
  ;; CHECK-NEXT: [trap oob]
  (func $encode-unsigned (export "encode-unsigned")
    (drop
      (string.encode_wtf16_array
        (string.const "ab")
        (array.new_default $array16
          (i32.const 28)
        )
        ;; This is a huge unsigned offset, so we will trap on oob.
        (i32.const -2)
      )
    )
  )

  ;; CHECK:      [fuzz-exec] calling encode-overflow
  ;; CHECK-NEXT: [trap oob]
  (func $encode-overflow (export "encode-overflow")
    ;; The string's size + the offset lead to an overflow here in the array.
    (drop
      (string.encode_wtf16_array
        (string.const "ab")
        (array.new_default $array16
          (i32.const 10)
        )
        (i32.const 9)
      )
    )
  )

  ;; CHECK:      [fuzz-exec] calling slice
  ;; CHECK-NEXT: [fuzz-exec] note result: slice => string("def")
  (func $slice (export "slice") (result (ref string))
    ;; Slicing [3:6] here should definitely output "def".
    (stringview_wtf16.slice
      (string.const "abcdefgh")
      (i32.const 3)
      (i32.const 6)
    )
  )

  ;; CHECK:      [fuzz-exec] calling slice-big
  ;; CHECK-NEXT: [fuzz-exec] note result: slice-big => string("defgh")
  (func $slice-big (export "slice-big") (result (ref string))
    ;; Slicing [3:huge unsigned value] leads to slicing til the end: "defgh".
    (stringview_wtf16.slice
      (string.const "abcdefgh")
      (i32.const 3)
      (i32.const -1)
    )
  )

  ;; CHECK:      [fuzz-exec] calling slice-ordering
  ;; CHECK-NEXT: [fuzz-exec] note result: slice-ordering => string("h")
  (func $slice-ordering (export "slice-ordering") (result (ref string))
    (local $0 i32)
    (stringview_wtf16.slice
      (string.const "hello")
      ;; If we were to defer emitting this get in the binary writer, it would
      ;; end up with the wrong value.
      (local.get $0)
      (local.tee $0
        (i32.const 1)
      )
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_empty
  ;; CHECK-NEXT: [fuzz-exec] note result: new_empty => string("")
  (func $new_empty (export "new_empty") (result stringref)
    ;; Make an empty string from an empty array.
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 0)
      )
      (i32.const 0)
      (i32.const 0)
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_empty_oob
  ;; CHECK-NEXT: [trap array oob]
  (func $new_empty_oob (export "new_empty_oob") (result stringref)
    ;; Try to make a string from an empty array that we slice at [1:0], which is
    ;; out of bounds due to the starting index.
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 0)
      )
      (i32.const 1)
      (i32.const 0)
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_empty_oob_2
  ;; CHECK-NEXT: [trap array oob]
  (func $new_empty_oob_2 (export "new_empty_oob_2") (result stringref)
    ;; Try to make a string from an empty array that we slice at [:1], which is
    ;; out of bounds due to the ending index.
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 0)
      )
      (i32.const 0)
      (i32.const 1)
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_oob
  ;; CHECK-NEXT: [trap array oob]
  (func $new_oob (export "new_oob") (result stringref)
    ;; Try to make a string from an array of size 1 that we slice at [1:0],
    ;; which is out of bounds due to the ending index (we must trap if the end
    ;; is less then the start).
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 1)
      )
      (i32.const 1)
      (i32.const 0)
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_2
  ;; CHECK-NEXT: [fuzz-exec] note result: new_2 => string("")
  (func $new_2 (export "new_2") (result stringref)
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 1)
      )
      (i32.const 1)
      (i32.const 1) ;; this changed, which makes this an in-bounds operation
                    ;; that emits an empty string
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_oob_3
  ;; CHECK-NEXT: [trap array oob]
  (func $new_oob_3 (export "new_oob_3") (result stringref)
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 1)
      )
      (i32.const 1)
      (i32.const 2) ;; this changed, and again we are out of bounds
    )
  )

  ;; CHECK:      [fuzz-exec] calling new_4
  ;; CHECK-NEXT: [fuzz-exec] note result: new_4 => string("\u0000")
  (func $new_4 (export "new_4") (result stringref)
    (string.new_wtf16_array
      (array.new_default $array16
        (i32.const 2) ;; this changed, and now we are in bounds, and emit a
                      ;; string of length 1 (with unicode 0)
      )
      (i32.const 1)
      (i32.const 2)
    )
  )

  ;; CHECK:      [fuzz-exec] calling slice-unicode
  ;; CHECK-NEXT: [fuzz-exec] note result: slice-unicode => string("d\u00a3f")
  (func $slice-unicode (export "slice-unicode") (result (ref string))
    (stringview_wtf16.slice
      ;; abcd£fgh
      (string.const "abcd\C2\A3fgh")
      (i32.const 3)
      (i32.const 6)
    )
  )

  ;; CHECK:      [fuzz-exec] calling concat-surrogates
  ;; CHECK-NEXT: [fuzz-exec] note result: concat-surrogates => string("\ud800\udf48")
  (func $concat-surrogates (export "concat-surrogates") (result (ref string))
    ;; Concatenating these surrogates creates '𐍈'.
    (string.concat (string.const "\ED\A0\80") (string.const "\ED\BD\88"))
  )

  ;; CHECK:      [fuzz-exec] calling string.from_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: string.from_code_point => string("A")
  (func $string.from_code_point (export "string.from_code_point") (result stringref)
    (string.from_code_point
      (i32.const 65)
    )
  )

  ;; CHECK:      [fuzz-exec] calling unsigned_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: unsigned_code_point => string("\u0093")
  (func $unsigned_code_point (export "unsigned_code_point") (result stringref)
    (string.from_code_point
      ;; This must be interpreted as unsigned, that is, in the escaped output
      ;; the top byte is 0.
      (i32.const 147)
    )
  )

  ;; CHECK:      [fuzz-exec] calling weird_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: weird_code_point => string("\u03e8")
  (func $weird_code_point (export "weird_code_point") (result stringref)
    (string.from_code_point
      (i32.const 0x3e8)
    )
  )

  ;; CHECK:      [fuzz-exec] calling isolated_high_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: isolated_high_code_point => string("\ud800")
  (func $isolated_high_code_point (export "isolated_high_code_point") (result stringref)
    (string.from_code_point
      (i32.const 0xD800)
    )
  )

  ;; CHECK:      [fuzz-exec] calling isolated_low_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: isolated_low_code_point => string("\udc00")
  (func $isolated_low_code_point (export "isolated_low_code_point") (result stringref)
    (string.from_code_point
      (i32.const 0xDC00)
    )
  )

  ;; CHECK:      [fuzz-exec] calling surrogate_pair_code_point
  ;; CHECK-NEXT: [fuzz-exec] note result: surrogate_pair_code_point => string("\u286c")
  (func $surrogate_pair_code_point (export "surrogate_pair_code_point") (result stringref)
    (string.from_code_point
      (i32.const 0x286c) ;; 𐍈
    )
  )

  ;; CHECK:      [fuzz-exec] calling invalid_code_point
  ;; CHECK-NEXT: [trap invalid code point]
  (func $invalid_code_point (export "invalid_code_point") (result stringref)
    (string.from_code_point
      (i32.const -83)
    )
  )

  ;; CHECK:      [fuzz-exec] calling string.measure
  ;; CHECK-NEXT: [fuzz-exec] note result: string.measure => 5
  (func $string.measure (export "string.measure") (result i32)
    (string.measure_wtf16
      (string.const "five!")
    )
  )

  ;; CHECK:      [fuzz-exec] calling extern
  ;; CHECK-NEXT: [fuzz-exec] note result: extern => string("string")
  (func $extern (export "extern") (result externref)
    (extern.convert_any
      (string.const "string")
    )
  )

  ;; CHECK:      [fuzz-exec] calling extern-intern
  ;; CHECK-NEXT: [fuzz-exec] note result: extern-intern => string("string")
  (func $extern-intern (export "extern-intern") (result anyref)
    (any.convert_extern
      (extern.convert_any
        (string.const "string")
      )
    )
  )
)
;; CHECK:      [fuzz-exec] calling new_wtf16_array
;; CHECK-NEXT: [fuzz-exec] note result: new_wtf16_array => string("ello")

;; CHECK:      [fuzz-exec] calling const
;; CHECK-NEXT: [fuzz-exec] note result: const => string("world")

;; CHECK:      [fuzz-exec] calling eq.1
;; CHECK-NEXT: [fuzz-exec] note result: eq.1 => 0

;; CHECK:      [fuzz-exec] calling eq.2
;; CHECK-NEXT: [fuzz-exec] note result: eq.2 => 1

;; CHECK:      [fuzz-exec] calling eq.3
;; CHECK-NEXT: [fuzz-exec] note result: eq.3 => 0

;; CHECK:      [fuzz-exec] calling eq.4
;; CHECK-NEXT: [fuzz-exec] note result: eq.4 => 0

;; CHECK:      [fuzz-exec] calling eq.5
;; CHECK-NEXT: [fuzz-exec] note result: eq.5 => 1

;; CHECK:      [fuzz-exec] calling compare.1
;; CHECK-NEXT: [trap null ref]

;; CHECK:      [fuzz-exec] calling compare.2
;; CHECK-NEXT: [trap null ref]

;; CHECK:      [fuzz-exec] calling compare.3
;; CHECK-NEXT: [trap null ref]

;; CHECK:      [fuzz-exec] calling compare.4
;; CHECK-NEXT: [fuzz-exec] note result: compare.4 => 0

;; CHECK:      [fuzz-exec] calling compare.5
;; CHECK-NEXT: [fuzz-exec] note result: compare.5 => -1

;; CHECK:      [fuzz-exec] calling compare.6
;; CHECK-NEXT: [fuzz-exec] note result: compare.6 => 1

;; CHECK:      [fuzz-exec] calling compare.7
;; CHECK-NEXT: [fuzz-exec] note result: compare.7 => -1

;; CHECK:      [fuzz-exec] calling compare.8
;; CHECK-NEXT: [fuzz-exec] note result: compare.8 => 1

;; CHECK:      [fuzz-exec] calling compare.9
;; CHECK-NEXT: [fuzz-exec] note result: compare.9 => 1

;; CHECK:      [fuzz-exec] calling compare.10
;; CHECK-NEXT: [fuzz-exec] note result: compare.10 => -1

;; CHECK:      [fuzz-exec] calling get_codeunit
;; CHECK-NEXT: [fuzz-exec] note result: get_codeunit => 99

;; CHECK:      [fuzz-exec] calling encode
;; CHECK-NEXT: [LoggingExternalInterface logging 3]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]
;; CHECK-NEXT: [LoggingExternalInterface logging 97]
;; CHECK-NEXT: [LoggingExternalInterface logging 98]
;; CHECK-NEXT: [LoggingExternalInterface logging 99]
;; CHECK-NEXT: [LoggingExternalInterface logging 0]

;; CHECK:      [fuzz-exec] calling encode-unsigned
;; CHECK-NEXT: [trap oob]

;; CHECK:      [fuzz-exec] calling encode-overflow
;; CHECK-NEXT: [trap oob]

;; CHECK:      [fuzz-exec] calling slice
;; CHECK-NEXT: [fuzz-exec] note result: slice => string("def")

;; CHECK:      [fuzz-exec] calling slice-big
;; CHECK-NEXT: [fuzz-exec] note result: slice-big => string("defgh")

;; CHECK:      [fuzz-exec] calling slice-ordering
;; CHECK-NEXT: [fuzz-exec] note result: slice-ordering => string("h")

;; CHECK:      [fuzz-exec] calling new_empty
;; CHECK-NEXT: [fuzz-exec] note result: new_empty => string("")

;; CHECK:      [fuzz-exec] calling new_empty_oob
;; CHECK-NEXT: [trap array oob]

;; CHECK:      [fuzz-exec] calling new_empty_oob_2
;; CHECK-NEXT: [trap array oob]

;; CHECK:      [fuzz-exec] calling new_oob
;; CHECK-NEXT: [trap array oob]

;; CHECK:      [fuzz-exec] calling new_2
;; CHECK-NEXT: [fuzz-exec] note result: new_2 => string("")

;; CHECK:      [fuzz-exec] calling new_oob_3
;; CHECK-NEXT: [trap array oob]

;; CHECK:      [fuzz-exec] calling new_4
;; CHECK-NEXT: [fuzz-exec] note result: new_4 => string("\u0000")

;; CHECK:      [fuzz-exec] calling slice-unicode
;; CHECK-NEXT: [fuzz-exec] note result: slice-unicode => string("d\u00a3f")

;; CHECK:      [fuzz-exec] calling concat-surrogates
;; CHECK-NEXT: [fuzz-exec] note result: concat-surrogates => string("\ud800\udf48")

;; CHECK:      [fuzz-exec] calling string.from_code_point
;; CHECK-NEXT: [fuzz-exec] note result: string.from_code_point => string("A")

;; CHECK:      [fuzz-exec] calling unsigned_code_point
;; CHECK-NEXT: [fuzz-exec] note result: unsigned_code_point => string("\u0093")

;; CHECK:      [fuzz-exec] calling weird_code_point
;; CHECK-NEXT: [fuzz-exec] note result: weird_code_point => string("\u03e8")

;; CHECK:      [fuzz-exec] calling isolated_high_code_point
;; CHECK-NEXT: [fuzz-exec] note result: isolated_high_code_point => string("\ud800")

;; CHECK:      [fuzz-exec] calling isolated_low_code_point
;; CHECK-NEXT: [fuzz-exec] note result: isolated_low_code_point => string("\udc00")

;; CHECK:      [fuzz-exec] calling surrogate_pair_code_point
;; CHECK-NEXT: [fuzz-exec] note result: surrogate_pair_code_point => string("\u286c")

;; CHECK:      [fuzz-exec] calling invalid_code_point
;; CHECK-NEXT: [trap invalid code point]

;; CHECK:      [fuzz-exec] calling string.measure
;; CHECK-NEXT: [fuzz-exec] note result: string.measure => 5

;; CHECK:      [fuzz-exec] calling extern
;; CHECK-NEXT: [fuzz-exec] note result: extern => string("string")

;; CHECK:      [fuzz-exec] calling extern-intern
;; CHECK-NEXT: [fuzz-exec] note result: extern-intern => string("string")
;; CHECK-NEXT: [fuzz-exec] comparing compare.1
;; CHECK-NEXT: [fuzz-exec] comparing compare.10
;; CHECK-NEXT: [fuzz-exec] comparing compare.2
;; CHECK-NEXT: [fuzz-exec] comparing compare.3
;; CHECK-NEXT: [fuzz-exec] comparing compare.4
;; CHECK-NEXT: [fuzz-exec] comparing compare.5
;; CHECK-NEXT: [fuzz-exec] comparing compare.6
;; CHECK-NEXT: [fuzz-exec] comparing compare.7
;; CHECK-NEXT: [fuzz-exec] comparing compare.8
;; CHECK-NEXT: [fuzz-exec] comparing compare.9
;; CHECK-NEXT: [fuzz-exec] comparing concat-surrogates
;; CHECK-NEXT: [fuzz-exec] comparing const
;; CHECK-NEXT: [fuzz-exec] comparing encode
;; CHECK-NEXT: [fuzz-exec] comparing encode-overflow
;; CHECK-NEXT: [fuzz-exec] comparing encode-unsigned
;; CHECK-NEXT: [fuzz-exec] comparing eq.1
;; CHECK-NEXT: [fuzz-exec] comparing eq.2
;; CHECK-NEXT: [fuzz-exec] comparing eq.3
;; CHECK-NEXT: [fuzz-exec] comparing eq.4
;; CHECK-NEXT: [fuzz-exec] comparing eq.5
;; CHECK-NEXT: [fuzz-exec] comparing extern
;; CHECK-NEXT: [fuzz-exec] comparing extern-intern
;; CHECK-NEXT: [fuzz-exec] comparing get_codeunit
;; CHECK-NEXT: [fuzz-exec] comparing invalid_code_point
;; CHECK-NEXT: [fuzz-exec] comparing isolated_high_code_point
;; CHECK-NEXT: [fuzz-exec] comparing isolated_low_code_point
;; CHECK-NEXT: [fuzz-exec] comparing new_2
;; CHECK-NEXT: [fuzz-exec] comparing new_4
;; CHECK-NEXT: [fuzz-exec] comparing new_empty
;; CHECK-NEXT: [fuzz-exec] comparing new_empty_oob
;; CHECK-NEXT: [fuzz-exec] comparing new_empty_oob_2
;; CHECK-NEXT: [fuzz-exec] comparing new_oob
;; CHECK-NEXT: [fuzz-exec] comparing new_oob_3
;; CHECK-NEXT: [fuzz-exec] comparing new_wtf16_array
;; CHECK-NEXT: [fuzz-exec] comparing slice
;; CHECK-NEXT: [fuzz-exec] comparing slice-big
;; CHECK-NEXT: [fuzz-exec] comparing slice-ordering
;; CHECK-NEXT: [fuzz-exec] comparing slice-unicode
;; CHECK-NEXT: [fuzz-exec] comparing string.from_code_point
;; CHECK-NEXT: [fuzz-exec] comparing string.measure
;; CHECK-NEXT: [fuzz-exec] comparing surrogate_pair_code_point
;; CHECK-NEXT: [fuzz-exec] comparing unsigned_code_point
;; CHECK-NEXT: [fuzz-exec] comparing weird_code_point