| ... | @@ -298,10 +298,10 @@ fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 { | ... | @@ -298,10 +298,10 @@ fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 { |
| 298 | } | 298 | } |
| 299 | | 299 | |
| 300 | test "strncmp" { | 300 | test "strncmp" { |
| 301 | try std.testing.expect(strncmp("a", "b", 1) == -1); | 301 | try std.testing.expect(strncmp("a", "b", 1) < 0); |
| 302 | try std.testing.expect(strncmp("a", "c", 1) == -2); | 302 | try std.testing.expect(strncmp("a", "c", 1) < 0); |
| 303 | try std.testing.expect(strncmp("b", "a", 1) == 1); | 303 | try std.testing.expect(strncmp("b", "a", 1) > 0); |
| 304 | try std.testing.expect(strncmp("\xff", "\x02", 1) == 253); | 304 | try std.testing.expect(strncmp("\xff", "\x02", 1) > 0); |
| 305 | } | 305 | } |
| 306 | | 306 | |
| 307 | // TODO we should be able to put this directly in std/linux/x86_64.zig but | 307 | // TODO we should be able to put this directly in std/linux/x86_64.zig but |