-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip one more test on macOS #1324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird. Especially because the max version, right below, seems to work fine.
Do you happen to have suitable hardware to test this? It could well be that |
No, I don't. There's a Mac at home that I could borrow, but unfortunately it's Intel. |
We'll find a creative solution. |
@Enchufa2 note that this test is not executed for the "release" versions of Rcpp, but only for the I have confirmed manually that when we force Lines 12 to 21 in 26fcdb2
|
Looks like this worked with an additional CI runner for macOS. Yay. (And thanks for the suggestion earlier, @jeroen) |
@jeroen Yes, I noted that. I was referring to line 1574, which has a similar test but with |
Don't we die immediately? So it may not get to that line? |
AFAIK, unless the session aborts or something, everything runs. E.g., put the following into a test file: library(tinytest)
expect_true(FALSE)
expect_true(TRUE)
expect_true(FALSE) Then: $ Rscript -e 'tinytest::run_test_file("test.R")'
test.R........................ 3 tests 2 fails 25ms
----- FAILED[data]: test.R<2--2>
call| expect_true(FALSE)
diff| Expected TRUE, got FALSE
----- FAILED[data]: test.R<4--4>
call| expect_true(FALSE)
diff| Expected TRUE, got FALSE
Showing 2 out of 3 results: 2 fails, 1 passes (25ms) |
Yes you are correct. I think I confused myself mentally comparing with "another popular flavour" for unit tests which we still use in another package that keeps me busy at work. |
Looking at the sugar code, we try to cast Rcpp/inst/include/Rcpp/sugar/functions/min.h Lines 62 to 63 in 9db1de4
Distilling this into a smaller example, I used:
On my ARM macOS machine:
And on an x86_64 Docker image:
And some StackOverflow searching suggests that attempting to cast To wit -- should we just return |
Yes. That seems like a bit of logic error / thinko given > Inf
[1] Inf
> as.integer(Inf)
[1] NA
Warning message:
NAs introduced by coercion to integer range
> Should we warn just like R does here? |
Perhaps... I'm not sure how closely we try to model the base R equivalents in the sugar functions. It is a little awkward for us that
|
Hoh boy. Isn't |
We are seeing an additional (new) failure on macOS and arm64 at r-universe (recent build log). We already skip a number of
NA
related tests on that platform so I added one. I cannot test this locally -- anybody reading this who has an arm64 mac and theclang
that @jeroen reports, namelyChecklist
R CMD check
still passes all tests