- Streamer$initialize has callSuper(...) so derived classes don't need
to initialize fields
- Producer-only streams allowed
- vignette revised to use new countGenomicOverlaps
- add some unit tests
- misc. code tidy, mostly wrapping long lines
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/Streamer@57786 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,18 @@ |
1 |
+test_Streamer_initialize_fields <- function() |
|
2 |
+{ |
|
3 |
+ ## derived classes should have fields initialized automatically |
|
4 |
+ c1 <- setRefClass("Consumer1", |
|
5 |
+ contains="Consumer", |
|
6 |
+ fields=list(a="integer")) |
|
7 |
+ checkIdentical(1L, c1$new(a=1L)$a) |
|
8 |
+ |
|
9 |
+ p1 <- setRefClass("Producer1", |
|
10 |
+ contains="Producer", |
|
11 |
+ fields=list(a="integer")) |
|
12 |
+ checkIdentical(1L, p1$new(a=1L)$a) |
|
13 |
+ |
|
14 |
+ s1 <- setRefClass("Stream1", |
|
15 |
+ contains="Stream", |
|
16 |
+ fields=list(a="integer")) |
|
17 |
+ checkIdentical(1L, s1$new(a=1L)$a) |
|
18 |
+} |