data.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. export const numbers = [
  2. 0,
  3. 1,
  4. -1,
  5. //
  6. Math.PI,
  7. -Math.PI,
  8. //8 bit
  9. 0x7f,
  10. 0x0f,
  11. //16 bit
  12. 0x7fff,
  13. 0x0fff,
  14. //32 bit
  15. 0x7fffffff,
  16. 0x0fffffff,
  17. //64 bit
  18. // 0x7FFFFFFFFFFFFFFF,
  19. // eslint-disable-next-line no-loss-of-precision
  20. 0x0fffffffffffffff,
  21. ];
  22. export const long_string = "ThisIsÁTèstString".repeat(100000);
  23. export const strings = [
  24. "",
  25. "hello",
  26. "café",
  27. "中文",
  28. "broccoli🥦līp𨋢grin😃ok",
  29. "\u{10ffff}",
  30. ];
  31. export { commit_data } from "./commit_data.js";
  32. export const uint8_arrays = [
  33. new Uint8Array(),
  34. new Uint8Array([0]),
  35. new Uint8Array([0, 1, 2, 3, 4, 6, 7]),
  36. new Uint8Array([0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15]),
  37. new Uint8Array([
  38. 0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23,
  39. 24, 25, 26, 27, 28, 30, 31,
  40. ]),
  41. ];
  42. export const int32_arrays = [
  43. new Int32Array([0].map((x) => -x)),
  44. new Int32Array([0, 1, 2, 3, 4, 6, 7].map((x) => -x)),
  45. new Int32Array(
  46. [0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15].map((x) => -x),
  47. ),
  48. new Int32Array(
  49. [
  50. 0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22,
  51. 23, 24, 25, 26, 27, 28, 30, 31,
  52. ].map((x) => -x),
  53. ),
  54. ];
  55. export const typed_array_view = new Uint8Array(uint8_arrays[4].buffer, 4);
  56. export const array_buffers = [
  57. new Uint8Array(),
  58. new Uint8Array([0]),
  59. new Uint8Array([0, 1, 2, 3, 4, 6, 7]),
  60. new Uint8Array([0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15]),
  61. new Uint8Array([
  62. 0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23,
  63. 24, 25, 26, 27, 28, 30, 31,
  64. ]),
  65. ].map((x) => x.buffer);
  66. export const dates = [
  67. new Date(Date.UTC(2024, 1, 1, 1, 1, 1, 1)),
  68. new Date(Date.UTC(1, 1, 1, 1, 1, 1, 1)),
  69. ];