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
Add support for check = 'equal', 'identical', 'equivalent' #16
Conversation
I think this is a great suggestion, thanks! A few notes:
If you give me push access to your PR, I can make these changes and merge. Thanks again! |
I made the changes to the two unrelated test cases because they were not passing, and I think they were not correct. Do they pass for you? They are not related to the pull request. As a separate proposal, would you be open to accepting a pull request with the existing tests converted a testthat file, so the tests can be run within an rstudio package easily? |
No tests have been changed since the last CRAN release, and all checks pass
on CRAN. I haven't run them recently, but they must have worked for me
before I submitted. I don't know why they don't work for you, but I assume
it's a problem with RStudio and/or dectools.
I would not accept a PR that used testthat (or any package from the
tidyverse). I'm annoyed enough with the behavioral changes in roxygen2. And
the first thing I did as maintainer was remove the hard dependence on
ggplot2 and the ~40 packages it requires. Sorry for the bit of a rant. It's
nothing you did...
I use RUnit for all the other packages I maintain. It would be straight
forward to convert this package to use it instead. I didn't convert this
package to use RUnit because there were only a few tests and the current
solution works.
|
OK, I don't see how this test should work; it should expect an error. test_unit_int <- function()
|
It looks like I was wrong. That test is incorrect, and does error. I don't understand why it doesn't cause an error with |
The previous tests weren't actually testing anything, as evidenced by the test_unit_int() function. It should have failed because it was expecting an error, but it did not fail. Thanks to @harvey131 for the report and patch! See #16.
I'm not sure why GitHub decided to close this... I force-pushed my updated changes to your repo before merging, so you wouldn't haven't to deal with upstream differences with master. So, despite this saying it's "closed", it really is merged. |
Would it be possible to push this updated revision onto cran? Thanks! |
Yes, thanks for the reminder! I've added it to my to-do list for this weekend. |
microbenchmark 1.4-7 is on its way to CRAN. |
The previous tests weren't actually testing anything, as evidenced by the test_unit_int() function. It should have failed because it was expecting an error, but it did not fail. Thanks to @harvey131 for the report and patch! See joshuaulrich#16.
Add support, tests, and documentation for the check argument to microbenchmark to allow it to be a string 'equal', 'identical', or 'equivalent'.
The user will not have to create a separate "my_check" function for common checks.