nealrichardson commented on a change in pull request #11751:
URL: https://github.com/apache/arrow/pull/11751#discussion_r762123752
##########
File path: r/tests/testthat/test-data-type.R
##########
@@ -427,3 +427,80 @@ test_that("DataType to C-interface", {
# must clean up the pointer or we leak
delete_arrow_schema(ptr)
})
+
+test_that("DataType$code()", {
Review comment:
FWIW that could also be written as
```
test_code_roundtrip <- function(x) {
expect_equal(eval(x$code()), x)
}
```
if you thought that were more readable because we use a version of
expect_equal that will call that Arrow `$Equals()` method
--
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]