Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Teach use_test()/test_active_file() about src #1566

Closed
hadley opened this issue Jan 12, 2022 · 0 comments · Fixed by #1730
Closed

Teach use_test()/test_active_file() about src #1566

hadley opened this issue Jan 12, 2022 · 0 comments · Fixed by #1730
Labels
code 🖥️ R/, tests/ feature a feature request or enhancement paths 🚶‍♂️

Comments

@hadley
Copy link
Member

hadley commented Jan 12, 2022

So that src/{foo}.c or (.cpp, .h, etc) would correspond to tests/testthat/test-{foo}.R.

@hadley hadley added the feature a feature request or enhancement label Jan 17, 2023
hadley pushed a commit that referenced this issue Jan 17, 2023
* Make it much broader so it now works with any file in `R/`, `src/` or `tests/testthat`. Fixes #1566
* This new foundation made it possible to make `use_c()` and `use_rcpp()` (and friends) to work the same way as `use_r()`/use_test()`.
* Since I was in here I fixed #1690.
* I also refactored the code to make it easier to test.
* I switched the errors I touch to use `cli::cli_abort()` so the messaging can point to the correct user facing function.
* I generally refactored the error handling so it happens in one central location.
hadley pushed a commit that referenced this issue Jan 17, 2023
* Make it much broader so it now works with any file in `R/`, `src/` or `tests/testthat`. Fixes #1566
* This new foundation made it possible to make `use_c()` and `use_rcpp()` (and friends) to work the same way as `use_r()`/use_test()`.
* Since I was in here I fixed #1690.
* I also refactored the code to make it easier to test.
* I switched the errors I touch to use `cli::cli_abort()` so the messaging can point to the correct user facing function.
* I generally refactored the error handling so it happens in one central location.
hadley added a commit that referenced this issue Jan 18, 2023
* Make it much broader so it now works with any file in `R/`, `src/` or `tests/testthat`. Fixes #1566
* This new foundation made it possible to make `use_c()` and `use_rcpp()` (and friends) to work the same way as `use_r()`/use_test()`.
* Since I was in here I fixed #1690.
* I also refactored the code to make it easier to test.
* I switched the errors I touch to use `cli::cli_abort()` so the messaging can point to the correct user facing function.
* I generally refactored the error handling so it happens in one central location.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
code 🖥️ R/, tests/ feature a feature request or enhancement paths 🚶‍♂️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants