| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 20a8175 commit 18cd002
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,20 +16,24 @@ function check(size, alignment, offset) { | |||
| 16 | 16 | global.gc(); | |
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | + // NOTE: If adding more check() test cases, | ||
| 20 | + // be sure to not duplicate alignment/offset. | ||
| 21 | + // Refs: https://github.com/nodejs/node/issues/31061#issuecomment-568612283 | ||
| 22 | + | ||
| 19 | 23 | check(64, 1, 0); | |
| 20 | 24 | ||
| 21 | 25 | // Buffers can have weird sizes. | |
| 22 | - check(97, 1, 0); | ||
| 26 | + check(97, 1, 1); | ||
| 23 | 27 | ||
| 24 | 28 | // Buffers can be unaligned | |
| 25 | 29 | check(64, 8, 0); | |
| 26 | 30 | check(64, 16, 0); | |
| 27 | 31 | check(64, 8, 1); | |
| 28 | 32 | check(64, 16, 1); | |
| 29 | - check(97, 8, 1); | ||
| 30 | - check(97, 16, 1); | ||
| 31 | 33 | check(97, 8, 3); | |
| 32 | 34 | check(97, 16, 3); | |
| 35 | + check(97, 8, 5); | ||
| 36 | + check(97, 16, 5); | ||
| 33 | 37 | ||
| 34 | 38 | // Empty ArrayBuffer does not allocate data, worth checking | |
| 35 | - check(0, 1, 0); | ||
| 39 | + check(0, 1, 2); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments