-
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.
Merge pull request #69 from katilingban/dev
add utils functions tests
- Loading branch information
Showing
4 changed files
with
53 additions
and
11 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
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
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 |
---|---|---|
@@ -1,13 +1,32 @@ | ||
# Test paleta ------------------------------------------------------------------ | ||
|
||
## Test paleta_fonts class | ||
library(ggplot2) | ||
|
||
## scatterplot | ||
p <- ggplot(data = mtcars, mapping = aes(x = mpg, y = disp, colour = factor(cyl))) + | ||
geom_point(size = 3) + | ||
scale_colour_manual( | ||
name = "Cylinders", | ||
values = acdc_palettes$acdc_secondary | ||
) + | ||
labs( | ||
title = "Light ACDC Theme", | ||
subtitle = "Using the Africa CDC secondary palette", | ||
) | ||
|
||
## Test paleta_fonts class ---- | ||
testthat::expect_type(paleta_fonts, "list") | ||
|
||
## Test length of paleta fonts | ||
## Test length of paleta fonts ---- | ||
testthat::expect_equal(length(paleta_fonts), 3) | ||
|
||
## Test output of set_paleta_font | ||
## Test output of set_paleta_font ---- | ||
testthat::expect_type(set_paleta_font(), "character") | ||
testthat::expect_equal(length(set_paleta_font()), 1) | ||
|
||
## test theme_paleta() ---- | ||
testthat::expect_silent(p + theme_paleta()) | ||
|
||
|
||
|
||
|
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