Skip to content

Commit eacacd8

Browse files
committed
set up unit tests
1 parent 4281e4a commit eacacd8

7 files changed

Lines changed: 30 additions & 1 deletion

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ Imports:
2727
rprojroot,
2828
yaml
2929
Suggests:
30-
rstudioapi
30+
rstudioapi,
31+
testthat (>= 3.0.0)
3132
Additional_repositories: https://inbo.r-universe.dev
3233
Config/checklist/communities: inbo
3334
Config/checklist/keywords: corporate identity; quarto
3435
Encoding: UTF-8
3536
Language: en-GB
3637
Roxygen: list(markdown = TRUE)
3738
RoxygenNote: 7.3.3
39+
Config/testthat/edition: 3

tests/testthat.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is part of the standard setup for testthat.
2+
# It is recommended that you do not modify it.
3+
#
4+
# Where should you do additional test configuration?
5+
# Learn more about the roles of various files in:
6+
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
7+
# * https://testthat.r-lib.org/articles/special-files.html
8+
9+
library(testthat)
10+
library(flandersqmd)
11+
12+
test_check("flandersqmd")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test_that("multiplication works", {
2+
expect_equal(2 * 2, 4)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test_that("multiplication works", {
2+
expect_equal(2 * 2, 4)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test_that("multiplication works", {
2+
expect_equal(2 * 2, 4)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test_that("multiplication works", {
2+
expect_equal(2 * 2, 4)
3+
})
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test_that("multiplication works", {
2+
expect_equal(2 * 2, 4)
3+
})

0 commit comments

Comments
 (0)