authorgravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-09-26 09:55:38-06:00
committergravatar for me@tadeo.caTadeo Kondrak <me@tadeo.ca> 2020-10-01 15:01:27-06:00
log70c507911a738538b8ef4df2b52184512e7d86a8
treec7953ef7a96558d889186cfe192ce18f6c25722d
parentc2ee66108c399b0359ce996980bd8593c3eb22ef
signature Commit is signed but in an unrecognized format.

Update @Type tests for alignment field in UnionField and StructFIeld


1 files changed, 8 insertions(+), 8 deletions(-)

test/stage1/behavior/type.zig+8-8
...@@ -320,8 +320,8 @@ test "Type.Union" {...@@ -320,8 +320,8 @@ test "Type.Union" {
320 .layout = .Auto,320 .layout = .Auto,
321 .tag_type = null,321 .tag_type = null,
322 .fields = &[_]TypeInfo.UnionField{322 .fields = &[_]TypeInfo.UnionField{
323 .{ .name = "int", .field_type = i32 },323 .{ .name = "int", .field_type = i32, .alignment = @alignOf(f32) },
324 .{ .name = "float", .field_type = f32 },324 .{ .name = "float", .field_type = f32, .alignment = @alignOf(f32) },
325 },325 },
326 .decls = &[_]TypeInfo.Declaration{},326 .decls = &[_]TypeInfo.Declaration{},
327 },327 },
...@@ -336,8 +336,8 @@ test "Type.Union" {...@@ -336,8 +336,8 @@ test "Type.Union" {
336 .layout = .Packed,336 .layout = .Packed,
337 .tag_type = null,337 .tag_type = null,
338 .fields = &[_]TypeInfo.UnionField{338 .fields = &[_]TypeInfo.UnionField{
339 .{ .name = "signed", .field_type = i32 },339 .{ .name = "signed", .field_type = i32, .alignment = @alignOf(i32) },
340 .{ .name = "unsigned", .field_type = u32 },340 .{ .name = "unsigned", .field_type = u32, .alignment = @alignOf(u32) },
341 },341 },
342 .decls = &[_]TypeInfo.Declaration{},342 .decls = &[_]TypeInfo.Declaration{},
343 },343 },
...@@ -363,8 +363,8 @@ test "Type.Union" {...@@ -363,8 +363,8 @@ test "Type.Union" {
363 .layout = .Auto,363 .layout = .Auto,
364 .tag_type = Tag,364 .tag_type = Tag,
365 .fields = &[_]TypeInfo.UnionField{365 .fields = &[_]TypeInfo.UnionField{
366 .{ .name = "signed", .field_type = i32 },366 .{ .name = "signed", .field_type = i32, .alignment = @alignOf(i32) },
367 .{ .name = "unsigned", .field_type = u32 },367 .{ .name = "unsigned", .field_type = u32, .alignment = @alignOf(u32) },
368 },368 },
369 .decls = &[_]TypeInfo.Declaration{},369 .decls = &[_]TypeInfo.Declaration{},
370 },370 },
...@@ -392,7 +392,7 @@ test "Type.Union from Type.Enum" {...@@ -392,7 +392,7 @@ test "Type.Union from Type.Enum" {
392 .layout = .Auto,392 .layout = .Auto,
393 .tag_type = Tag,393 .tag_type = Tag,
394 .fields = &[_]TypeInfo.UnionField{394 .fields = &[_]TypeInfo.UnionField{
395 .{ .name = "working_as_expected", .field_type = u32 },395 .{ .name = "working_as_expected", .field_type = u32, .alignment = @alignOf(u32) },
396 },396 },
397 .decls = &[_]TypeInfo.Declaration{},397 .decls = &[_]TypeInfo.Declaration{},
398 },398 },
...@@ -408,7 +408,7 @@ test "Type.Union from regular enum" {...@@ -408,7 +408,7 @@ test "Type.Union from regular enum" {
408 .layout = .Auto,408 .layout = .Auto,
409 .tag_type = E,409 .tag_type = E,
410 .fields = &[_]TypeInfo.UnionField{410 .fields = &[_]TypeInfo.UnionField{
411 .{ .name = "working_as_expected", .field_type = u32 },411 .{ .name = "working_as_expected", .field_type = u32, .alignment = @alignOf(u32) },
412 },412 },
413 .decls = &[_]TypeInfo.Declaration{},413 .decls = &[_]TypeInfo.Declaration{},
414 },414 },