We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0376138 commit 6a11909Copy full SHA for 6a11909
jscomp/test/string_runtime_test.ml
@@ -14,9 +14,9 @@ let suites = Mt.[
14
"caml_string_of_bytes", (fun _ ->
15
16
let f len =
17
- let b = Bytes.create 1000 in
18
- Bytes.unsafe_fill b 0 len 'c';
19
- (B.bytes_to_string b, (String.init len (fun _ -> 'c'))) in
+ let b = Bytes.create len in
+ Bytes.fill b 0 len 'c';
+ (Bytes.to_string b, (String.init len (fun _ -> 'c'))) in
20
let (a,b) =
21
List.split @@ List.map (fun x -> f x ) [1000;1024;1025;4095;4096;5000;10000] in
22
Eq(a,b)
0 commit comments