Skip to content

Commit

Permalink
chore: Slightly more lenient test for error message on Windows (#515)
Browse files Browse the repository at this point in the history
A follow-up to #514 for a case I missed. Again, we can do slightly
better with printing large numbers in error messages (particularly on
Windows), but for now the message will at least signal the gist of what
happened.
  • Loading branch information
paleolimbot authored Jun 10, 2024
1 parent 9f96d24 commit 7b88926
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/nanoarrow/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1486,9 +1486,11 @@ TEST(ArrayTest, ArrayTestAppendToRunEndEncodedArray) {
array.offset = INT32_MAX;
EXPECT_EQ(ArrowArrayFinishBuilding(&array, NANOARROW_VALIDATION_LEVEL_FULL, &error),
EINVAL);
EXPECT_STREQ(ArrowErrorMessage(&error),
"Offset + length of a run-end encoded array must fit in a value of the "
"run end type int32, but offset + length is 2147483654");
EXPECT_THAT(
ArrowErrorMessage(&error),
::testing::StartsWith(
"Offset + length of a run-end encoded array must fit in a value of the "
"run end type int32, but offset + length is"));

((struct ArrowArrayPrivateData*)(array.children[0]->private_data))->storage_type =
NANOARROW_TYPE_INT16;
Expand Down

0 comments on commit 7b88926

Please sign in to comment.