David Gonzalez Martin 49c8f47459 More self-hosted work
2024-04-16 21:18:07 -06:00

13 lines
411 B
Plaintext

const std = #import("std");
const Arena = std.Arena;
const concatenate_bytes = std.concatenate_bytes;
const byte_equal = std.byte_equal;
const expect = std.testing.expect;
const main = fn () *!void {
var arena = try Arena.init(2*1024*1024);
const concatenation = try concatenate_bytes(arena, .{ "ABC", "DEF" }.&);
const are_equal = byte_equal(concatenation, "ABCDEF");
try expect(are_equal);
}