tests/testthat/_snaps/trans.md
raw| 1 | # as.transform generates informative error |
| 2 | |
| 3 | Code |
| 4 | as.transform(1) |
| 5 | Condition |
| 6 | Error in `as.transform()`: |
| 7 | ! `x` must be a character vector or transform object, not the number 1. |
| 8 | Code |
| 9 | as.transform("x") |
| 10 | Condition |
| 11 | Error in `as.transform()`: |
| 12 | ! Could not find any function named `transform_x()` or `x_trans()` |
| 13 | |
| 14 | # trans has useful print method |
| 15 | |
| 16 | Code |
| 17 | new_transform("test", transform = identity, inverse = identity) |
| 18 | Output |
| 19 | Transformer: test [-Inf, Inf] |
| 20 |