mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
Delete dead test code (#10405)
* Delete dead test code * Apply formatting changes --------- Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -447,29 +447,3 @@ pub const MutableString = struct {
|
||||
return bytes.len;
|
||||
}
|
||||
};
|
||||
|
||||
test "MutableString" {
|
||||
const alloc = std.heap.page_allocator;
|
||||
|
||||
var str = try MutableString.initCopy(alloc, "hello");
|
||||
try expect(str.eql("hello"));
|
||||
}
|
||||
|
||||
test "MutableString.ensureValidIdentifier" {
|
||||
const alloc = std.heap.page_allocator;
|
||||
|
||||
try std.testing.expectEqualStrings("jquery", try MutableString.ensureValidIdentifier("jquery", alloc));
|
||||
try std.testing.expectEqualStrings("jquery_foo", try MutableString.ensureValidIdentifier("jquery😋foo", alloc));
|
||||
}
|
||||
|
||||
test "MutableString BufferedWriter" {
|
||||
const alloc = std.heap.page_allocator;
|
||||
|
||||
var str = try MutableString.init(alloc, 0);
|
||||
var buffered_writer = str.bufferedWriter();
|
||||
var writer = buffered_writer.writer();
|
||||
try writer.writeAll("hello world hello world hello world hello world hello world hello world");
|
||||
try writer.context.flush();
|
||||
str = writer.context.context.*;
|
||||
try std.testing.expectEqualStrings("hello world hello world hello world hello world hello world hello world", str.toOwnedSlice());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user