aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-30 02:55:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-30 02:55:41 -0700
commit7067764ed3f85eca17be7310b848ad97bd8af52e (patch)
treee61901ce753c541d3c3778c544bd98826691efb8 /test/compile_errors.zig
parente2d1f9874df2a9221aaa9ec55bd2974b70601f64 (diff)
parentfe117d9961c3622fda5c359733d01de686509af0 (diff)
downloadzig-7067764ed3f85eca17be7310b848ad97bd8af52e.tar.gz
zig-7067764ed3f85eca17be7310b848ad97bd8af52e.zip
Merge remote-tracking branch 'origin/master' into llvm11
The changes to install_files.h needed to put into src/libcxx.zig
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index f457c74609..7a33de4f19 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -4,6 +4,14 @@ const std = @import("std");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add("slice sentinel mismatch",
\\export fn entry() void {
+ \\ const x = @import("std").meta.Vector(3, f32){ 25, 75, 5, 0 };
+ \\}
+ , &[_][]const u8{
+ "tmp.zig:2:62: error: index 3 outside vector of size 3",
+ });
+
+ cases.add("slice sentinel mismatch",
+ \\export fn entry() void {
\\ const y: [:1]const u8 = &[_:2]u8{ 1, 2 };
\\}
, &[_][]const u8{
@@ -2347,7 +2355,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ exit(0);
\\}
, &[_][]const u8{
- "tmp.zig:3:5: error: dependency on library c must be explicitly specified in the build command",
+ "tmp.zig:3:5: error: dependency on libc must be explicitly specified in the build command",
});
cases.addTest("libc headers note",
@@ -7548,7 +7556,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
});
cases.add( // fixed bug #2032
- "compile diagnostic string for top level decl type",
+ "compile diagnostic string for top level decl type",
\\export fn entry() void {
\\ var foo: u32 = @This(){};
\\}