-
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.
mudancas e testes na padronizar_logradouros()
- Loading branch information
Showing
3 changed files
with
46 additions
and
8 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
test_that("da erro com inputs != de caracteres", { | ||
expect_error(padronizar_logradouros(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_logradouros("r. gen.. glicério"), "RUA GENERAL GLICERIO") | ||
expect_equal(padronizar_logradouros(NA_character_), "") | ||
}) | ||
|
||
test_that("lida com vetores vazios corretamente", { | ||
expect_equal(padronizar_logradouros(character(0)), character(0)) | ||
}) |