HuaHuaY commented on code in PR #206:
URL: https://github.com/apache/iceberg-cpp/pull/206#discussion_r2371376377
##########
test/literal_test.cc:
##########
@@ -30,6 +30,22 @@
namespace iceberg {
+namespace {
+
+// Helper function to assert that a CastTo operation succeeds and checks
+// the resulting type and value.
+template <typename T>
+void AssertCastSucceeds(const Result<Literal>& result, TypeId expected_type_id,
+ const T& expected_value) {
+ ASSERT_THAT(result, IsOk());
+ EXPECT_EQ(result->type()->type_id(), expected_type_id);
+ ASSERT_NO_THROW(EXPECT_EQ(std::get<T>(result->value()), expected_value))
+ << "Value type mismatch in std::get. Expected type for TypeId "
Review Comment:
value mismatch here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]