Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Nov 3, 2019
1 parent feb45d6 commit b50a277
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions R/predicates.R
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,6 @@ is_dag <- function(x) {
m <- m[!(m %in% G[, 2])]
if (length(m) != 0)
S <- append(S, m)
} else {
break()
}
k <- k + 1
}
Expand Down
7 changes: 7 additions & 0 deletions tests/testthat/test-stratigraphy.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ test_that("Initialize a StratigraphicMatrix instance", {
# Empty instence
expect_s4_class(.StratigraphicMatrix(), "StratigraphicMatrix")
})
test_that("StratigraphicMatrix constructor", {
options("verbose" = TRUE)
cnd <- catch_conditions(StratigraphicMatrix())
for (i in seq_len(2)) {
expect_s3_class(cnd[[i]], "message_class_initialize")
}
})
test_that("non DAG fails", {
harris1 <- rbind(harris, c(1, 9))
cnd <- catch_conditions(as_stratigraphy(harris1))
Expand Down

0 comments on commit b50a277

Please sign in to comment.