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:
Jarred Sumner
2024-04-20 21:25:10 -07:00
committed by GitHub
parent 707fd7f1ea
commit 1191bf0c15
37 changed files with 0 additions and 3623 deletions

View File

@@ -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());
}