moving stuff to custom git instance
This commit is contained in:
parent
a66e58193f
commit
ccb992a44a
42 changed files with 4947 additions and 10390 deletions
|
|
@ -1,34 +0,0 @@
|
|||
#include "runner.h"
|
||||
#include "../pretty_print.h"
|
||||
#include "../arena.h"
|
||||
#include <stdio.h>
|
||||
|
||||
UNIT_TEST(pretty_print_basic) {
|
||||
arena_t arena = arena_make(ARENA_MALLOC, KB(4));
|
||||
|
||||
// The pretty_print function outputs to console, so we can't easily verify its exact output
|
||||
// Instead, we'll just verify it doesn't crash
|
||||
pretty_print(arena, "Hello, <red>World!</>");
|
||||
|
||||
// Test with formatting
|
||||
pretty_print(arena, "Value: <blue>%d</>, String: <green>%s</>", 42, "test");
|
||||
|
||||
arena_cleanup(&arena);
|
||||
}
|
||||
|
||||
// Helper function to test variadic function
|
||||
void test_pretty_printv(arena_t arena, const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
pretty_printv(arena, fmt, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
UNIT_TEST(pretty_printv) {
|
||||
arena_t arena = arena_make(ARENA_MALLOC, KB(4));
|
||||
|
||||
// Test the helper function
|
||||
test_pretty_printv(arena, "Test <yellow>%d</> <cyan>%s</>", 42, "variadic");
|
||||
|
||||
arena_cleanup(&arena);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue