aboutsummaryrefslogtreecommitdiff
path: root/std/cstr.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-03-16 16:02:35 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-03-16 16:02:35 -0400
commitaf536ac343564e5120f99cbf3b7fc9efa984eb93 (patch)
tree42a937bca75d34e2d3b4fc7d44ebafa66d8bd55b /std/cstr.zig
parent329457bb4f714a8392153dfecfabd6f356144688 (diff)
downloadzig-af536ac343564e5120f99cbf3b7fc9efa984eb93.tar.gz
zig-af536ac343564e5120f99cbf3b7fc9efa984eb93.zip
introduce new test syntax
* remove setFnTest builtin * add test "name" { ... } syntax * remove --check-unused argument. functions are always lazy now.
Diffstat (limited to 'std/cstr.zig')
-rw-r--r--std/cstr.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/std/cstr.zig b/std/cstr.zig
index a34f3155c2..ab250474df 100644
--- a/std/cstr.zig
+++ b/std/cstr.zig
@@ -140,9 +140,7 @@ pub const Buffer0 = struct {
}
};
-fn testSimpleBuffer0() {
- @setFnTest(this);
-
+test "simple Buffer0" {
var buf = %%Buffer0.initEmpty(&debug.global_allocator);
assert(buf.len() == 0);
%%buf.appendCStr(c"hello");
@@ -162,9 +160,7 @@ fn testSimpleBuffer0() {
assert(buf.startsWithOther(&buf2));
}
-fn testCStrFns() {
- @setFnTest(this);
-
+test "cstr fns" {
comptime testCStrFnsImpl();
testCStrFnsImpl();
}