-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
test_that("da erro com inputs != de caracteres", { | ||
expect_error(padronizar_complementos(12)) | ||
}) | ||
|
||
test_that("padroniza corretamente", { | ||
# complicado fazer um teste pra cada uma das regexs usadas. testando só um | ||
# basiquinho da manipulação, depois pensamos melhor se vale a pena fazer um | ||
# teste pra cada regex ou não | ||
|
||
expect_equal(padronizar_complementos("qd 5 bl 7"), "QUADRA 5 BLOCO 7") | ||
expect_equal(padronizar_complementos(NA_character_), NA_character_) | ||
expect_equal(padronizar_complementos(""), NA_character_) | ||
}) | ||
|
||
test_that("lida com vetores vazios corretamente", { | ||
expect_equal(padronizar_complementos(character(0)), character(0)) | ||
}) |