Skip to content

Commit

Permalink
Fix unit test error due to recent changes
Browse files Browse the repository at this point in the history
o Fix unit test errors related to changes due to issue #168.
o Add missing aliases for bpi in documentation.
  • Loading branch information
jorainer committed Nov 16, 2016
1 parent b5a1d37 commit 858f17b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions man/OnDiskMSnExp-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
\alias{spectra,OnDiskMSnExp-method}
\alias{tic,OnDiskMSnExp-method}
\alias{bpi,OnDiskMSnExp-method}
\alias{bpi}
\alias{precScanNum,OnDiskMSnExp-method}
\alias{featureNames<-,OnDiskMSnExp-method}
\alias{featureNames<-,OnDiskMSnExp,ANY-method}
Expand Down
12 changes: 7 additions & 5 deletions tests/testthat/test_OnDiskMSnExp.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ test_that("Compare MS1 MSnExp and OnDiskMSnExp content", {
expect_identical(rtime(inMem), rtime(onDisk))
## o polarity
expect_identical(polarity(inMem), polarity(onDisk))
## o tic
expect_identical(tic(inMem), tic(onDisk))
## o tic: Note: have to calculate as one of the two doesn't provide the
## initial values.
expect_identical(tic(inMem), tic(onDisk, initial = FALSE))
## o ionCount
expect_identical(ionCount(inMem), ionCount(onDisk))
## o peaksCount
Expand All @@ -106,22 +107,23 @@ test_that("Compare removePeaks and cleaned MSnExp and OnDiskMSnExp", {
onDiskCleaned <- clean(onDisk)
expect_true(all.equal(inMemCleaned, onDiskCleaned))
expect_identical(ionCount(inMemCleaned), ionCount(onDiskCleaned))
expect_identical(tic(inMemCleaned), tic(onDiskCleaned))
expect_identical(tic(inMemCleaned), tic(onDiskCleaned, initial = FALSE))
expect_identical(peaksCount(inMemCleaned), peaksCount(onDiskCleaned))
## o removePeaks
inMemRemPeaks <- removePeaks(inMem, t = 1000)
onDiskRemPeaks <- removePeaks(onDisk, t = 1000)
expect_true(all.equal(inMemRemPeaks, onDiskRemPeaks))
expect_identical(ionCount(inMemRemPeaks), ionCount(onDiskRemPeaks))
expect_identical(tic(inMemRemPeaks), tic(onDiskRemPeaks))
expect_identical(tic(inMemRemPeaks), tic(onDiskRemPeaks, initial = FALSE))
expect_identical(peaksCount(inMemRemPeaks), peaksCount(onDiskRemPeaks))
## o removePeaks and clean
inMemRemPeaksCleaned <- clean(inMemRemPeaks)
onDiskRemPeaksCleaned <- clean(onDiskRemPeaks)
expect_true(all.equal(inMemRemPeaksCleaned, onDiskRemPeaksCleaned))
expect_identical(ionCount(inMemRemPeaksCleaned),
ionCount(onDiskRemPeaksCleaned))
expect_identical(tic(inMemRemPeaksCleaned), tic(onDiskRemPeaksCleaned))
expect_identical(tic(inMemRemPeaksCleaned), tic(onDiskRemPeaksCleaned,
initial = FALSE))
expect_identical(peaksCount(inMemRemPeaksCleaned),
peaksCount(onDiskRemPeaksCleaned))
## compare assayData, intensity and mz,
Expand Down

0 comments on commit 858f17b

Please sign in to comment.