| ... | ... | @@ -1,3 +1,4 @@ |
| 1 | const builtin = @import("builtin"); |
| 1 | 2 | const std = @import("std.zig"); |
| 2 | 3 | const debug = std.debug; |
| 3 | 4 | const mem = std.mem; |
| ... | ... | @@ -810,14 +811,6 @@ test eql { |
| 810 | 811 | try testing.expect(eql(EU.tst(false), EU.tst(false))); |
| 811 | 812 | try testing.expect(!eql(EU.tst(false), EU.tst(true))); |
| 812 | 813 | |
| 813 | | const V = @Vector(4, u32); |
| 814 | | const v1: V = @splat(1); |
| 815 | | const v2: V = @splat(1); |
| 816 | | const v3: V = @splat(2); |
| 817 | | |
| 818 | | try testing.expect(eql(v1, v2)); |
| 819 | | try testing.expect(!eql(v1, v3)); |
| 820 | | |
| 821 | 814 | const CU = union(enum) { |
| 822 | 815 | a: void, |
| 823 | 816 | b: void, |
| ... | ... | @@ -826,6 +819,16 @@ test eql { |
| 826 | 819 | |
| 827 | 820 | try testing.expect(eql(CU{ .a = {} }, .a)); |
| 828 | 821 | try testing.expect(!eql(CU{ .a = {} }, .b)); |
| 822 | |
| 823 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 824 | |
| 825 | const V = @Vector(4, u32); |
| 826 | const v1: V = @splat(1); |
| 827 | const v2: V = @splat(1); |
| 828 | const v3: V = @splat(2); |
| 829 | |
| 830 | try testing.expect(eql(v1, v2)); |
| 831 | try testing.expect(!eql(v1, v3)); |
| 829 | 832 | } |
| 830 | 833 | |
| 831 | 834 | /// Deprecated: use `std.enums.fromInt` instead and handle null. |