File: pathological.tests.R

package info (click to toggle)
r-cran-network 1.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,516 kB
  • sloc: ansic: 2,491; sh: 13; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#Set to TRUE to run tests
if(FALSE){

library(network)
if (require(statnet.common,quietly=TRUE)){

  opttest({
    gctorture(TRUE)
    n <- 10
    test <- network.initialize(n)
    for (i in 1:(n-1)){
      for (j in (i+1):n){
        cat(i,j,'\n')
        get.inducedSubgraph(test,v=i:j)
      }
    }
    gctorture(FALSE)
  },'Ticket #180 Test 1','NETWORK_pathology_TESTS')

  opttest({
    gctorture(TRUE)
    test <- network.initialize(10)
    delete.vertices(test,5)
    gctorture(FALSE)
  },'Ticket #180 Test 2','NETWORK_pathology_TESTS')

  opttest({
    x <- network.initialize(10)
    x[,] <- 1
    try(set.edge.value(x,'foo',matrix('bar',5,5)))
  },'Ticket #827','NETWORK_pathology_TESTS')

}

#End tests
}