aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/test.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-07-11 15:58:48 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-07-11 16:00:06 -0400
commit9bdcd2a495d4189d6536d43f1294dffb38daa9a5 (patch)
tree95072bfc6959b2b7efd26381492934855b8c0fbf /src-self-hosted/test.zig
parent5954c94d2079c9b378ae14bb4c9c24aed719beec (diff)
downloadzig-9bdcd2a495d4189d6536d43f1294dffb38daa9a5.tar.gz
zig-9bdcd2a495d4189d6536d43f1294dffb38daa9a5.zip
add std.event.Future
This is like a promise, but it's for multiple getters, and uses an event loop.
Diffstat (limited to 'src-self-hosted/test.zig')
-rw-r--r--src-self-hosted/test.zig11
1 files changed, 2 insertions, 9 deletions
diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig
index ffad7f1b8d..4455352f95 100644
--- a/src-self-hosted/test.zig
+++ b/src-self-hosted/test.zig
@@ -12,14 +12,7 @@ test "compile errors" {
try ctx.init();
defer ctx.deinit();
- try ctx.testCompileError(
- \\export fn entry() void {}
- \\export fn entry() void {}
- , file1, 2, 8, "exported symbol collision: 'entry'");
-
- try ctx.testCompileError(
- \\fn() void {}
- , file1, 1, 1, "missing function name");
+ try @import("../test/stage2/compile_errors.zig").addCases(&ctx);
try ctx.run();
}
@@ -27,7 +20,7 @@ test "compile errors" {
const file1 = "1.zig";
const allocator = std.heap.c_allocator;
-const TestContext = struct {
+pub const TestContext = struct {
loop: std.event.Loop,
zig_lib_dir: []u8,
zig_cache_dir: []u8,