data.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 typed_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. new Int32Array([0].map((x) => -x)),
  42. new Int32Array([0, 1, 2, 3, 4, 6, 7].map((x) => -x)),
  43. new Int32Array(
  44. [0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15].map((x) => -x),
  45. ),
  46. new Int32Array(
  47. [
  48. 0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22,
  49. 23, 24, 25, 26, 27, 28, 30, 31,
  50. ].map((x) => -x),
  51. ),
  52. ];
  53. export const typed_array_view = new Uint8Array(typed_arrays[6].buffer, 4);
  54. export const array_buffers = [
  55. new Uint8Array(),
  56. new Uint8Array([0]),
  57. new Uint8Array([0, 1, 2, 3, 4, 6, 7]),
  58. new Uint8Array([0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15]),
  59. new Uint8Array([
  60. 0, 1, 2, 3, 4, 6, 78, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23,
  61. 24, 25, 26, 27, 28, 30, 31,
  62. ]),
  63. ].map((x) => x.buffer);
  64. export const dates = [
  65. new Date(Date.UTC(2024, 1, 1, 1, 1, 1, 1)),
  66. new Date(Date.UTC(1, 1, 1, 1, 1, 1, 1)),
  67. ];