From 50dd086b53ab62563b64ab7978afbe1bee2cfb4c Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Tue, 27 Aug 2024 17:35:57 +0800 Subject: [PATCH] fix: fix linux build issue --- src/ArgParser.hpp | 1 + testbench/main.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ArgParser.hpp b/src/ArgParser.hpp index 46228f7..075bcd5 100644 --- a/src/ArgParser.hpp +++ b/src/ArgParser.hpp @@ -4,6 +4,7 @@ #include "Constraints.hpp" #include "EncodingHelper.hpp" #include "ParserHelper.hpp" +#include #include #include #include diff --git a/testbench/main.cpp b/testbench/main.cpp index b49c2b0..0c8c562 100644 --- a/testbench/main.cpp +++ b/testbench/main.cpp @@ -242,7 +242,7 @@ namespace YYCCTestbench { #define TEST_MACRO(type_t, value, string_value, ...) { \ YYCC::yycc_u8string cache_string(YYCC_U8(string_value)); \ type_t cache; \ - Assert(YYCC::ParserHelper::TryParse(cache_string, cache, __VA_ARGS__) && cache == value, YYCC_U8("YYCC::StringHelper::TryParse<" #type_t ">")); \ + Assert(YYCC::ParserHelper::TryParse(cache_string, cache, ##__VA_ARGS__) && cache == value, YYCC_U8("YYCC::StringHelper::TryParse<" #type_t ">")); \ } TEST_MACRO(int8_t, INT8_C(-61), "-61"); @@ -264,7 +264,7 @@ namespace YYCCTestbench { #define TEST_MACRO(type_t, string_value, ...) { \ YYCC::yycc_u8string cache_string(YYCC_U8(string_value)); \ type_t cache; \ - Assert(!YYCC::ParserHelper::TryParse(cache_string, cache, __VA_ARGS__), YYCC_U8("YYCC::StringHelper::TryParse<" #type_t ">")); \ + Assert(!YYCC::ParserHelper::TryParse(cache_string, cache, ##__VA_ARGS__), YYCC_U8("YYCC::StringHelper::TryParse<" #type_t ">")); \ } TEST_MACRO(int8_t, "6161"); @@ -284,7 +284,7 @@ namespace YYCCTestbench { // Test ToString #define TEST_MACRO(type_t, value, string_value, ...) { \ type_t cache = value; \ - YYCC::yycc_u8string ret(YYCC::ParserHelper::ToString(cache, __VA_ARGS__)); \ + YYCC::yycc_u8string ret(YYCC::ParserHelper::ToString(cache, ##__VA_ARGS__)); \ Assert(ret == YYCC_U8(string_value), YYCC_U8("YYCC::StringHelper::ToString<" #type_t ">")); \ }