mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
15 lines
274 B
Zig
15 lines
274 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
test "packed struct equality" {
|
|
const S = packed struct {
|
|
a: u4,
|
|
b: u4,
|
|
};
|
|
const x: S = .{ .a = 1, .b = 2 };
|
|
const y: S = .{ .b = 2, .a = 1 };
|
|
try expect(x == y);
|
|
}
|
|
|
|
// test
|