| ... | ... | @@ -82,7 +82,7 @@ fn testPointer() !void { |
| 82 | 82 | try expect(u32_ptr_info.pointer.size == .one); |
| 83 | 83 | try expect(u32_ptr_info.pointer.is_const == false); |
| 84 | 84 | try expect(u32_ptr_info.pointer.is_volatile == false); |
| 85 | | try expect(u32_ptr_info.pointer.alignment == @alignOf(u32)); |
| 85 | try expect(u32_ptr_info.pointer.alignment == null); |
| 86 | 86 | try expect(u32_ptr_info.pointer.child == u32); |
| 87 | 87 | try expect(u32_ptr_info.pointer.sentinel() == null); |
| 88 | 88 | } |
| ... | ... | @@ -99,7 +99,7 @@ fn testUnknownLenPtr() !void { |
| 99 | 99 | try expect(u32_ptr_info.pointer.is_const == true); |
| 100 | 100 | try expect(u32_ptr_info.pointer.is_volatile == true); |
| 101 | 101 | try expect(u32_ptr_info.pointer.sentinel() == null); |
| 102 | | try expect(u32_ptr_info.pointer.alignment == @alignOf(f64)); |
| 102 | try expect(u32_ptr_info.pointer.alignment == null); |
| 103 | 103 | try expect(u32_ptr_info.pointer.child == f64); |
| 104 | 104 | } |
| 105 | 105 | |
| ... | ... | @@ -130,7 +130,7 @@ fn testSlice() !void { |
| 130 | 130 | try expect(u32_slice_info.pointer.size == .slice); |
| 131 | 131 | try expect(u32_slice_info.pointer.is_const == false); |
| 132 | 132 | try expect(u32_slice_info.pointer.is_volatile == false); |
| 133 | | try expect(u32_slice_info.pointer.alignment == 4); |
| 133 | try expect(u32_slice_info.pointer.alignment == null); |
| 134 | 134 | try expect(u32_slice_info.pointer.child == u32); |
| 135 | 135 | } |
| 136 | 136 | |
| ... | ... | @@ -266,9 +266,9 @@ fn testUnion() !void { |
| 266 | 266 | try expect(notag_union_info.@"union".tag_type == null); |
| 267 | 267 | try expect(notag_union_info.@"union".layout == .auto); |
| 268 | 268 | try expect(notag_union_info.@"union".fields.len == 2); |
| 269 | | try expect(notag_union_info.@"union".fields[0].alignment == @alignOf(void)); |
| 269 | try expect(notag_union_info.@"union".fields[0].alignment == null); |
| 270 | 270 | try expect(notag_union_info.@"union".fields[1].type == u32); |
| 271 | | try expect(notag_union_info.@"union".fields[1].alignment == @alignOf(u32)); |
| 271 | try expect(notag_union_info.@"union".fields[1].alignment == null); |
| 272 | 272 | |
| 273 | 273 | const TestExternUnion = extern union { |
| 274 | 274 | foo: *anyopaque, |
| ... | ... | @@ -292,7 +292,7 @@ fn testStruct() !void { |
| 292 | 292 | const unpacked_struct_info = @typeInfo(TestStruct); |
| 293 | 293 | try expect(unpacked_struct_info.@"struct".is_tuple == false); |
| 294 | 294 | try expect(unpacked_struct_info.@"struct".backing_integer == null); |
| 295 | | try expect(unpacked_struct_info.@"struct".fields[0].alignment == @alignOf(u32)); |
| 295 | try expect(unpacked_struct_info.@"struct".fields[0].alignment == null); |
| 296 | 296 | try expect(unpacked_struct_info.@"struct".fields[0].defaultValue().? == 4); |
| 297 | 297 | try expect(mem.eql(u8, "foobar", unpacked_struct_info.@"struct".fields[1].defaultValue().?)); |
| 298 | 298 | } |
| ... | ... | @@ -314,11 +314,11 @@ fn testPackedStruct() !void { |
| 314 | 314 | try expect(struct_info.@"struct".layout == .@"packed"); |
| 315 | 315 | try expect(struct_info.@"struct".backing_integer == u128); |
| 316 | 316 | try expect(struct_info.@"struct".fields.len == 4); |
| 317 | | try expect(struct_info.@"struct".fields[0].alignment == 0); |
| 317 | try expect(struct_info.@"struct".fields[0].alignment == null); |
| 318 | 318 | try expect(struct_info.@"struct".fields[2].type == f32); |
| 319 | 319 | try expect(struct_info.@"struct".fields[2].defaultValue() == null); |
| 320 | 320 | try expect(struct_info.@"struct".fields[3].defaultValue().? == 4); |
| 321 | | try expect(struct_info.@"struct".fields[3].alignment == 0); |
| 321 | try expect(struct_info.@"struct".fields[3].alignment == null); |
| 322 | 322 | try expect(struct_info.@"struct".decls.len == 1); |
| 323 | 323 | } |
| 324 | 324 | |