Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
traceon committed Feb 15, 2020
1 parent 0b9b68f commit d9d97a2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 11 additions & 8 deletions driver/test/statement_parameters_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,9 @@ TEST_P(ParameterColumnRoundTripDecimalAsStringSymmetric, Execute) {

INSTANTIATE_TEST_SUITE_P(TypeConversion, ParameterColumnRoundTripDecimalAsStringSymmetric,
::testing::Values(

// TODO: do DECIMALs have to not start with dot?

"0",
"12345",
"-12345",
Expand All @@ -620,19 +623,19 @@ INSTANTIATE_TEST_SUITE_P(TypeConversion, ParameterColumnRoundTripDecimalAsString
"12345.001002003000",
"10000000000000000000",
"-10000000000000000000",
"0.00000000000000000001",
"-0.0000000000000000001",
".00000000000000000001",
"-.0000000000000000001",
"9876543210987654321",
"0.9876543210987654321",
".9876543210987654321",
"-9876543210987654321",
"-0.9876543210987654321",
"-.9876543210987654321",
"9999999999999999999",
"-9999999999999999999",
"0.9999999999999999999",
"-0.9999999999999999999",
".9999999999999999999",
"-.9999999999999999999",
"18446744073709551615",
"-18446744073709551615",
"0.18446744073709551615",
"-0.18446744073709551615"
".18446744073709551615",
"-.18446744073709551615"
)
);
2 changes: 2 additions & 0 deletions driver/utils/type_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,7 @@ namespace value_manip {
}
else {
std::string dest_obj;
to_null(dest_obj);
::value_manip::from_value<SourceType>::template to_value<std::string>::convert(src, dest_obj);
return fillOutputString<SQLCHAR>(dest_obj, dest.value, dest.value_max_size, dest.value_size, true);
}
Expand All @@ -1725,6 +1726,7 @@ namespace value_manip {
}
else {
std::string dest_obj;
to_null(dest_obj);
::value_manip::from_value<SourceType>::template to_value<std::string>::convert(src, dest_obj);
return fillOutputString<SQLWCHAR>(dest_obj, dest.value, dest.value_max_size, dest.value_size, true);
}
Expand Down

0 comments on commit d9d97a2

Please sign in to comment.