aboutsummaryrefslogtreecommitdiff
path: root/std/buffer.zig
diff options
context:
space:
mode:
Diffstat (limited to 'std/buffer.zig')
-rw-r--r--std/buffer.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/std/buffer.zig b/std/buffer.zig
index 32228af558..bc6aa254da 100644
--- a/std/buffer.zig
+++ b/std/buffer.zig
@@ -139,15 +139,13 @@ pub const Buffer = struct {
};
test "simple Buffer" {
- const cstr = @import("cstr.zig");
-
var buf = try Buffer.init(debug.global_allocator, "");
testing.expect(buf.len() == 0);
try buf.append("hello");
try buf.append(" ");
try buf.append("world");
testing.expect(buf.eql("hello world"));
- testing.expect(mem.eql(u8, cstr.toSliceConst(buf.toSliceConst().ptr), buf.toSliceConst()));
+ testing.expect(mem.eql(u8, mem.toSliceConst(u8, buf.toSliceConst().ptr), buf.toSliceConst()));
var buf2 = try Buffer.initFromBuffer(buf);
testing.expect(buf.eql(buf2.toSliceConst()));