2025-06-24 11:29:01 +08:00
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include <yycc.hpp>
|
2025-06-30 08:45:18 +08:00
|
|
|
#include <yycc/num/stringify.hpp>
|
2025-06-24 11:29:01 +08:00
|
|
|
|
|
|
|
#include <yycc/prelude/rust.hpp>
|
|
|
|
|
2025-06-30 08:45:18 +08:00
|
|
|
#define STRINGIFY ::yycc::num::stringify
|
2025-06-24 11:29:01 +08:00
|
|
|
|
2025-06-30 08:45:18 +08:00
|
|
|
namespace yycctest::num::stringify {
|
2025-06-24 11:29:01 +08:00
|
|
|
|
2025-07-14 09:43:23 +08:00
|
|
|
#define TEST_NS NumStringify
|
|
|
|
|
2025-06-26 10:27:33 +08:00
|
|
|
#define TEST_SUCCESS(type_t, value, string_value, ...) \
|
|
|
|
{ \
|
|
|
|
type_t cache = value; \
|
|
|
|
u8string ret = STRINGIFY::stringify<type_t>(cache, ##__VA_ARGS__); \
|
|
|
|
EXPECT_EQ(ret, YYCC_U8(string_value)); \
|
|
|
|
}
|
2025-06-24 11:29:01 +08:00
|
|
|
|
2025-07-14 09:43:23 +08:00
|
|
|
#include "../../shared/stringify_template.hpp"
|
2025-06-24 11:29:01 +08:00
|
|
|
|
2025-06-26 10:27:33 +08:00
|
|
|
} // namespace yycctest::string::stringify
|