Skip to content

Commit

Permalink
tests: complete unit test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Nov 20, 2024
1 parent ff8146a commit 40c14e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test_MsBackendMgf.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ test_that("export,MsBackendMgf works", {
res <- readLines(fl)
expect_true(length(grep("TITLE=msLevel", res)) == 0)

spectraNames(sps) <- paste0("yes", seq_along(sps))
export(MsBackendMgf(), sps, file = fl, exportTitle = TRUE)
res <- readLines(fl)
expect_true(length(grep("TITLE=yes", res)) == 0)

expect_error(export(MsBackendMgf(), file = fl), "missing")
expect_error(export(MsBackendMgf(), x = spd, file = fl), "spectra data to")

Expand Down

0 comments on commit 40c14e0

Please sign in to comment.