Skip to content

Commit

Permalink
add explicit test for horizon subsetting with j only #137
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Jul 11, 2020
1 parent 8ee53e4 commit b3f133d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test-DT-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ res <- lapply(dfclasses, function(use_class) {
# profile and horizon subsets
expect_true(inherits(sp1df[1, 1], 'SoilProfileCollection'))

# horizon subsets
expect_true(inherits(sp1df[, 2], 'SoilProfileCollection'))

# there should only be 1 profile and 1 horizon
expect_equal(length(sp1df[1, 1]), 1)
expect_equal(nrow(sp1df[1, 1]), 1)
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-SPC-objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ test_that("SPC subsetting ", {
# profile and horizon subsets
expect_true(inherits(sp1[1, 1], 'SoilProfileCollection'))

# horizon subsets
expect_true(inherits(sp1[, 2], 'SoilProfileCollection'))

# there should only be 1 profile and 1 horizon
expect_equal(length(sp1[1, 1]), 1)
expect_equal(nrow(sp1[1, 1]), 1)
Expand Down

0 comments on commit b3f133d

Please sign in to comment.