diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-09-28 02:33:32 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-09-28 02:33:32 -0400 |
| commit | b581da41f82cd1e19701030bf47675b426608adf (patch) | |
| tree | bbfebb52858935e2e91ffabd8b0c2b02fb58ca27 /std/str.zig | |
| parent | e5fd8efcb60cd0223a7dd5e5825d3b9efc006c2a (diff) | |
| download | zig-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.zig | 5 |
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")); |
