Add unit test for processPileupChrBin() function
... | ... |
@@ -170,3 +170,20 @@ test_that("extractNucleotide() must return expected results when nucleotide not |
170 | 170 |
|
171 | 171 |
expect_identical(result1, 0) |
172 | 172 |
}) |
173 |
+ |
|
174 |
+ |
|
175 |
+############################################################################# |
|
176 |
+### Tests processPileupChrBin() results |
|
177 |
+############################################################################# |
|
178 |
+ |
|
179 |
+context("processPileupChrBin() results") |
|
180 |
+ |
|
181 |
+ |
|
182 |
+test_that("processPileupChrBin() must return NULL when chromosome absent", { |
|
183 |
+ |
|
184 |
+ varDf <- c("chr1"=c(1,2,3), "chr2"=c(1,3,5)) |
|
185 |
+ result1 <- RAIDS:::processPileupChrBin(chr="chr3", resPileup=NULL, |
|
186 |
+ varDf=varDf, verbose=FALSE) |
|
187 |
+ |
|
188 |
+ expect_identical(result1, NULL) |
|
189 |
+}) |
|
173 | 190 |
\ No newline at end of file |