std: promote tests to doctests

Now these show up as "example usage" in generated documentation.
This commit is contained in:
Andrew Kelley
2024-03-13 15:56:09 -07:00
parent 5ae838d105
commit 12191c8a22
26 changed files with 311 additions and 289 deletions

View File

@@ -287,7 +287,7 @@ pub fn BoundedArrayAligned(
};
}
test "BoundedArray" {
test BoundedArray {
var a = try BoundedArray(u8, 64).init(32);
try testing.expectEqual(a.capacity(), 64);