Skip to content

Commit

Permalink
Convert TypeConversionTest tests to use Tril::format() instead of std…
Browse files Browse the repository at this point in the history
…::snprintf()
  • Loading branch information
janvrany committed Dec 15, 2023
1 parent 13024c5 commit 47c882c
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions fvtest/compilertriltest/TypeConversionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEST_P(Int8ToInt32, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -136,7 +136,7 @@ TEST_P(UInt8ToInt32, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -193,7 +193,7 @@ TEST_P(Int8ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -250,7 +250,7 @@ TEST_P(UInt8ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -307,7 +307,7 @@ TEST_P(Int16ToInt32, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -364,7 +364,7 @@ TEST_P(UInt16ToInt32, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -421,7 +421,7 @@ TEST_P(Int16ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -478,7 +478,7 @@ TEST_P(UInt16ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -535,7 +535,7 @@ TEST_P(Int32ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -591,7 +591,7 @@ TEST_P(UInt32ToInt64, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -653,7 +653,7 @@ TEST_P(Int64ToInt32, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -726,7 +726,7 @@ TEST_P(Int32ToFloat, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Float"
" (block"
" (freturn"
Expand Down Expand Up @@ -782,7 +782,7 @@ TEST_P(Int64ToFloat, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Float"
" (block"
" (freturn"
Expand Down Expand Up @@ -838,7 +838,7 @@ TEST_P(Int32ToDouble, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Double"
" (block"
" (dreturn"
Expand Down Expand Up @@ -894,7 +894,7 @@ TEST_P(Int64ToDouble, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Double"
" (block"
" (dreturn"
Expand Down Expand Up @@ -990,7 +990,7 @@ TEST_P(FloatToInt32, UsingConst) {
}

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -1057,7 +1057,7 @@ TEST_P(FloatToInt64, UsingConst) {
}

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -1119,7 +1119,7 @@ TEST_P(DoubleToInt32, UsingConst) {
}

char inputTrees[512] = {0};
std::snprintf(inputTrees, 512,
Tril::format(inputTrees, 512,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -1181,7 +1181,7 @@ TEST_P(DoubleToInt64, UsingConst) {
}

char inputTrees[512] = {0};
std::snprintf(inputTrees, 512,
Tril::format(inputTrees, 512,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down Expand Up @@ -1258,7 +1258,7 @@ TEST_P(FloatToDouble, UsingConst) {
}

char inputTrees[160] = {0};
std::snprintf(inputTrees, 160,
Tril::format(inputTrees, 160,
"(method return=Double"
" (block"
" (dreturn"
Expand Down Expand Up @@ -1328,7 +1328,7 @@ TEST_P(DoubleToFloat, UsingConst) {
}

char inputTrees[512] = {0};
std::snprintf(inputTrees, 512,
Tril::format(inputTrees, 512,
"(method return=Float"
" (block"
" (freturn"
Expand Down Expand Up @@ -1505,7 +1505,7 @@ TEST_P(FloatNormalizeNan, UsingLoadConst) {
uint32_t value = GetParam();

char inputTrees[300] = {0};
std::snprintf(inputTrees, sizeof(inputTrees),
Tril::format(inputTrees, sizeof(inputTrees),
"(method return=Int32 args=[Int32]"
" (block"
" (ireturn"
Expand Down Expand Up @@ -1588,7 +1588,7 @@ TEST_P(DoubleNormalizeNan, UsingLoadConst) {
uint64_t value = GetParam();

char inputTrees[300] = {0};
std::snprintf(inputTrees, sizeof(inputTrees),
Tril::format(inputTrees, sizeof(inputTrees),
"(method return=Int64 args=[Int64]"
" (block"
" (lreturn"
Expand Down Expand Up @@ -1622,7 +1622,7 @@ TEST_P(Int32BitsToFloat, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[256] = {0};
std::snprintf(inputTrees, 256,
Tril::format(inputTrees, 256,
"(method return=Float"
" (block"
" (freturn"
Expand Down Expand Up @@ -1693,7 +1693,7 @@ TEST_P(FloatBitsToInt32, UsingConst) {
}

char inputTrees[256] = {0};
std::snprintf(inputTrees, 256,
Tril::format(inputTrees, 256,
"(method return=Int32"
" (block"
" (ireturn"
Expand Down Expand Up @@ -1755,7 +1755,7 @@ TEST_P(Int64BitsToDouble, UsingConst) {
auto param = TRTest::to_struct(GetParam());

char inputTrees[256] = {0};
std::snprintf(inputTrees, 256,
Tril::format(inputTrees, 256,
"(method return=Double"
" (block"
" (dreturn"
Expand Down Expand Up @@ -1830,7 +1830,7 @@ TEST_P(DoubleBitsToInt64, UsingConst) {
}

char inputTrees[512] = {0};
std::snprintf(inputTrees, 512,
Tril::format(inputTrees, 512,
"(method return=Int64"
" (block"
" (lreturn"
Expand Down

0 comments on commit 47c882c

Please sign in to comment.