1#ifndef NXDK_PGRAPH_TESTS_DEBUG_OUTPUT_H
2#define NXDK_PGRAPH_TESTS_DEBUG_OUTPUT_H
4#pragma clang diagnostic push
5#pragma clang diagnostic ignored "-Wmacro-redefined"
7#pragma clang diagnostic pop
11#include "printf/printf.h"
15 PrintAssertAndWaitForever(#c, __FILE__, __LINE__); \
18template <
typename... VarArgs>
19inline void PrintMsg(
const char *fmt, VarArgs &&...args) {
20 int string_length = snprintf_(
nullptr, 0, fmt, args...);
22 buf.resize(string_length);
24 snprintf_(&buf[0], string_length + 1, fmt, args...);
25 DbgPrint(
"%s", buf.c_str());
28[[noreturn]]
void PrintAssertAndWaitForever(
const char *assert_code,
const char *filename, uint32_t line);