- Fix
is.empty
to work with vectorized input.
%within%
is vectorized.
- Fixed a bug where functions could not be used as formals.
- Add the ability to manually define a testing frame using an explicit precondition passed to
function_test_objects
, which is now exported.
- Switch to stable versioning.
- Add
is_empty
as an alias foris.empty
.
- Allow empty string to be a default argument in a validated function.
- Fixed the bug that prevented using function names in conditions or in arguments.
- Fixed the bug that caused a warning when too many default arguments were assigned.
%within%
is exported.
- Added a matcher for atomic (e.g.,
1 %is% atomic
).
package_exports_checked
now can take a file path as well as a package name.
- Introduce
package_exports_checked
, which checks a package for whether all exported functions are checked using checkr (either have zero formals or are wrapped inensure
blocks). - Add a test for
any
(e.g.,1 %is% any
) that will always beTRUE
. This is useful to be explicit that your function can take any input.
- Allow
NULL
to work as a result of the function inensure
orquickcheck
.
- Prevent errors in testthat from the function name being too long.
- Resolve bugs with nesting quickchecks within quickchecks.
- Allow a custom testing frame to be passed to quickcheck.
- Add
%within%
as a helper to test membership within a numeric boundary.
- Validated functions now keep their formals instead of being coerced to splat.
- Add Travis.
- Pass R CMD CHECK and lintr.
- Some functions are no longer validated because this ran into circular issues.
- Redo the imputation of arguments within the validator.
- Remove calls to the now non-existent
validations
package.
- Adds
%does_not_contain%
as a validator. - Adds NA and NULL as classes that can be tested using
%is%
,%contains%
, etc. - Fixed bugs where missing arguments were not allowed in certain places where they should be allowed.
- Prevent a failed quickcheck from breaking the entire test suite. Quickcheck now returns FALSE when failing instead of an error.
- The testthat integration in quickcheck can be turned off with
testthat = FALSE
- Fixed a bug where the report of the quickcheck failure would not be correct because the output was too long.
- Fixed a bug where quickcheck breaks if it can't load some built-in dataframes.
- Removed stray references to the old validation package.
- Fixed a merge conflict.
- Fixed how we checked for missing args, fixing bugs with
missing
andpresent
.
- Added
present
to check for the presence of arguments.
- Added quickcheck.
- Validating a function twice creates an error.
- Printing a validated function will show the preconditions, postconditions, and the original function, rather than the metaprogramming behind the scenes.
- Fixed a bug when calling functions with default arguments.
- Clarified
random_string
preconditions to not allow length >1length
arguments or alphabets where each letter has more than one character.
- Adds helpers
preconditions
andpostconditions
for fetching the conditions of validated functions. - Handles default arguments and missing arguments in function calls.
- The resulting function is now also of class
validated_function
.
- Initial package