summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test-heatmap.R23
-rw-r--r--tests/testthat/text-heatmap.R5
2 files changed, 23 insertions, 5 deletions
diff --git a/tests/testthat/test-heatmap.R b/tests/testthat/test-heatmap.R
new file mode 100644
index 0000000..24eae8d
--- /dev/null
+++ b/tests/testthat/test-heatmap.R
@@ -0,0 +1,23 @@
+test_that("returns a ggplot object", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with labels", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, labels = TRUE)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with labels and title", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, title = 'test', labels = TRUE)
+ inherits(p, 'ggplot')
+})
+
+test_that("returns a ggplot object with title", {
+ x <- matrix(data = rnorm(100), nrow = 10)
+ p <- heatmap(x, title = 'test')
+ inherits(p, 'ggplot')
+})
diff --git a/tests/testthat/text-heatmap.R b/tests/testthat/text-heatmap.R
deleted file mode 100644
index 94ea14e..0000000
--- a/tests/testthat/text-heatmap.R
+++ /dev/null
@@ -1,5 +0,0 @@
-test_that("returns a ggplot object", {
- x <- matrix(data = rnorm(100), nrow = 10)
- p <- heatmap(x)
- inherits(p, 'ggplot')
-})