aboutsummaryrefslogtreecommitdiff
path: root/std/str.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-09-28 02:33:32 -0400
committerAndrew Kelley <superjoe30@gmail.com>2016-09-28 02:33:32 -0400
commitb581da41f82cd1e19701030bf47675b426608adf (patch)
treebbfebb52858935e2e91ffabd8b0c2b02fb58ca27 /std/str.zig
parente5fd8efcb60cd0223a7dd5e5825d3b9efc006c2a (diff)
downloadzig-b581da41f82cd1e19701030bf47675b426608adf.tar.gz
zig-b581da41f82cd1e19701030bf47675b426608adf.zip
remove compiler directives
* add `setFnTest`, `setFnVisible`, `setFnStaticEval`, `setFnNoInline` builtin functions to replace previous directive functionality * add `coldcc` and `nakedcc` as keywords which can be used as part of a function prototype. * `setDebugSafety` builtin can be used to set debug safety features at a per block scope level. * closes #169
Diffstat (limited to 'std/str.zig')
-rw-r--r--std/str.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/std/str.zig b/std/str.zig
index e72a042e3f..ced98a46ea 100644
--- a/std/str.zig
+++ b/std/str.zig
@@ -12,8 +12,9 @@ pub fn sliceEql(inline T: type, a: []const T, b: []const T) -> bool {
return true;
}
-#attribute("test")
-fn stringEquality() {
+fn testStringEquality() {
+ @setFnTest(this, true);
+
assert(eql("abcd", "abcd"));
assert(!eql("abcdef", "abZdef"));
assert(!eql("abcdefg", "abcdef"));