Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn committed Oct 29, 2024
1 parent 85c993a commit acb4504
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ namespace {
const int base = static_cast<int>(args[1].GetOrDefault<ui16>(0));
char* pos = nullptr;
unsigned long long res = std::strtoull(input, &pos, base);
if (!res && errno == EINVAL) {
return TUnboxedValuePod();
}

ui64 ret = static_cast<ui64>(res);
if (!res && pos == input) {
return TUnboxedValuePod();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"uri": "file://test.test_ToUint64F2_/extracted"
}
],
"test.test[ToUint64F3]": [
{
"uri": "file://test.test_ToUint64F3_/extracted"
}
],
"test.test[ToUint64]": [
{
"uri": "file://test.test_ToUint64_/results.txt"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<tmp_path>/program.sql:<main>: Fatal: Execution

<tmp_path>/program.sql:<main>:2:1: Fatal: Execution of node: Result
SELECT
^
<tmp_path>/program.sql:<main>:2:1: Fatal: Incorrect base
SELECT
^
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,35 @@
}
]
};
{
"Write" = [
{
"Type" = [
"ListType";
[
"StructType";
[
[
"column0";
[
"OptionalType";
[
"DataType";
"Uint64"
]
]
]
]
]
];
"Data" = [
[
#
]
]
}
]
};
{
"Write" = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
xfail

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT
Unicode::ToUint64("0",1);

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ SELECT
SELECT
Unicode::TryToUint64("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 16);

SELECT
Unicode::TryToUint64("0", 1);

SELECT
Unicode::TryToUint64("0x1234abcd", 16),
Unicode::TryToUint64("0X4", 16),
Expand Down

0 comments on commit acb4504

Please sign in to comment.