mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
rename behavior test to better describe what it does
In general, let's not lean on GitHub issue numbers as having meaning. The goal of behavior tests is to produce a minimum set of tests that test 100% of the language.
This commit is contained in:
parent
3667489051
commit
d4911794ae
@ -55,7 +55,6 @@ test {
|
||||
_ = @import("behavior/bugs/3384.zig");
|
||||
_ = @import("behavior/bugs/3586.zig");
|
||||
_ = @import("behavior/bugs/3742.zig");
|
||||
_ = @import("behavior/bugs/3779.zig");
|
||||
_ = @import("behavior/bugs/4328.zig");
|
||||
_ = @import("behavior/bugs/4560.zig");
|
||||
_ = @import("behavior/bugs/4769_a.zig");
|
||||
@ -209,6 +208,7 @@ test {
|
||||
_ = @import("behavior/slice.zig");
|
||||
_ = @import("behavior/slice_sentinel_comptime.zig");
|
||||
_ = @import("behavior/src.zig");
|
||||
_ = @import("behavior/string_literals.zig");
|
||||
_ = @import("behavior/struct.zig");
|
||||
_ = @import("behavior/struct_contains_null_ptr_itself.zig");
|
||||
_ = @import("behavior/struct_contains_slice_of_itself.zig");
|
||||
|
||||
@ -36,11 +36,11 @@ test "@typeName() returns a string literal" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
try std.testing.expect(*const [type_name.len:0]u8 == @TypeOf(type_name));
|
||||
try std.testing.expect(std.mem.eql(u8, "behavior.bugs.3779.TestType", type_name));
|
||||
try std.testing.expect(std.mem.eql(u8, "behavior.bugs.3779.TestType", ptr_type_name[0..type_name.len]));
|
||||
try std.testing.expect(std.mem.eql(u8, "behavior.string_literals.TestType", type_name));
|
||||
try std.testing.expect(std.mem.eql(u8, "behavior.string_literals.TestType", ptr_type_name[0..type_name.len]));
|
||||
}
|
||||
|
||||
const actual_contents = @embedFile("3779_file_to_embed.txt");
|
||||
const actual_contents = @embedFile("file_to_embed.txt");
|
||||
const ptr_actual_contents: [*:0]const u8 = actual_contents;
|
||||
const expected_contents = "hello zig\n";
|
||||
|
||||
@ -64,7 +64,7 @@ test "@src() returns a struct containing 0-terminated string slices" {
|
||||
|
||||
const src = testFnForSrc();
|
||||
try std.testing.expect([:0]const u8 == @TypeOf(src.file));
|
||||
try std.testing.expect(std.mem.endsWith(u8, src.file, "3779.zig"));
|
||||
try std.testing.expect(std.mem.endsWith(u8, src.file, "string_literals.zig"));
|
||||
try std.testing.expect([:0]const u8 == @TypeOf(src.fn_name));
|
||||
try std.testing.expect(std.mem.endsWith(u8, src.fn_name, "testFnForSrc"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user