Skip to content

Commit

Permalink
Changes to ensure test(number instead of test(name (#6041)
Browse files Browse the repository at this point in the history
Related to #6040 -- it will be good to keep to a pattern where `test()` always has a numeric literal in the `num=` argument, even if it's a dynamic test where the base number is incremented by a variable amount. Doing so will make the `testPattern=` argument to `test.data.table()` more usable.

We can add a linter for this (#5908) to prevent regression later.

<details>

Linter to find these:

```r
l=make_linter_from_xpath(
  "//SYMBOL_FUNCTION_CALL[text() = 'test']/parent::expr/following-sibling::expr[1][SYMBOL or expr[1]/SYMBOL]",
  "xxx")
lint("inst/tests/tests.Rraw", l())
```

</details>
  • Loading branch information
MichaelChirico authored Apr 9, 2024
1 parent b09649b commit ac60ca2
Showing 1 changed file with 127 additions and 123 deletions.
Loading

0 comments on commit ac60ca2

Please sign in to comment.