Skip to content

Commit

Permalink
try removing odd integer sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
thejoshwolfe committed Jun 15, 2023
1 parent 7849d9c commit 0499df2
Showing 1 changed file with 54 additions and 53 deletions.
107 changes: 54 additions & 53 deletions lib/std/json/static_test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,94 +22,95 @@ const Primitives = struct {
// f16, f80, f128: don't work in std.fmt.parseFloat(T).
f32: f32,
f64: f64,
u0: u0,
i0: i0,
u1: u1,
i1: i1,
u8: u8,
i8: i8,
i130: i130,
// TODO: some strange linker error with these types.
//u0: u0,
//i0: i0,
//u1: u1,
//i1: i1,
//u8: u8,
//i8: i8,
//i130: i130,
};

const primitives_0 = Primitives{
.bool = false,
.f32 = 0,
.f64 = 0,
.u0 = 0,
.i0 = 0,
.u1 = 0,
.i1 = 0,
.u8 = 0,
.i8 = 0,
.i130 = 0,
//.u0 = 0,
//.i0 = 0,
//.u1 = 0,
//.i1 = 0,
//.u8 = 0,
//.i8 = 0,
//.i130 = 0,
};
const primitives_0_doc_0 =
\\{
\\ "bool": false,
\\ "f32": 0,
\\ "f64": 0,
\\ "u0": 0,
\\ "i0": 0,
\\ "u1": 0,
\\ "i1": 0,
\\ "u8": 0,
\\ "i8": 0,
\\ "i130": 0
\\ "f64": 0
//\\ "u0": 0,
//\\ "i0": 0,
//\\ "u1": 0,
//\\ "i1": 0,
//\\ "u8": 0,
//\\ "i8": 0,
//\\ "i130": 0
\\}
;
const primitives_0_doc_1 = // looks like a float.
\\{
\\ "bool": false,
\\ "f32": 0.0,
\\ "f64": 0.0,
\\ "u0": 0.0,
\\ "i0": 0.0,
\\ "u1": 0.0,
\\ "i1": 0.0,
\\ "u8": 0.0,
\\ "i8": 0.0,
\\ "i130": 0.0
\\ "f64": 0.0
//\\ "u0": 0.0,
//\\ "i0": 0.0,
//\\ "u1": 0.0,
//\\ "i1": 0.0,
//\\ "u8": 0.0,
//\\ "i8": 0.0,
//\\ "i130": 0.0
\\}
;

const primitives_1 = Primitives{
.bool = true,
.f32 = 1073741824,
.f64 = 1152921504606846976,
.u0 = 0,
.i0 = 0,
.u1 = 1,
.i1 = -1,
.u8 = 255,
.i8 = -128,
.i130 = -680564733841876926926749214863536422911,
//.u0 = 0,
//.i0 = 0,
//.u1 = 1,
//.i1 = -1,
//.u8 = 255,
//.i8 = -128,
//.i130 = -680564733841876926926749214863536422911,
};
const primitives_1_doc_0 =
\\{
\\ "bool": true,
\\ "f32": 1073741824,
\\ "f64": 1152921504606846976,
\\ "u0": 0,
\\ "i0": 0,
\\ "u1": 1,
\\ "i1": -1,
\\ "u8": 255,
\\ "i8": -128,
\\ "i130": -680564733841876926926749214863536422911
\\ "f64": 1152921504606846976
//\\ "u0": 0,
//\\ "i0": 0,
//\\ "u1": 1,
//\\ "i1": -1,
//\\ "u8": 255,
//\\ "i8": -128,
//\\ "i130": -680564733841876926926749214863536422911
\\}
;
const primitives_1_doc_1 = // float rounding.
\\{
\\ "bool": true,
\\ "f32": 1073741825,
\\ "f64": 1152921504606846977,
\\ "u0": 0,
\\ "i0": 0,
\\ "u1": 1,
\\ "i1": -1,
\\ "u8": 255,
\\ "i8": -128,
\\ "i130": -680564733841876926926749214863536422911
\\ "f64": 1152921504606846977
//\\ "u0": 0,
//\\ "i0": 0,
//\\ "u1": 1,
//\\ "i1": -1,
//\\ "u8": 255,
//\\ "i8": -128,
//\\ "i130": -680564733841876926926749214863536422911
\\}
;

Expand Down

0 comments on commit 0499df2

Please sign in to comment.