16
16
## TODO: %--%, %->%, other special functions
20
test_that("complex attributes work", {
24
foo <- lapply(1:vcount(g), seq, from=1)
27
V(g)$foo[[5]][1:3] <- 0
28
expect_that(V(g)[(1:10)[-5]]$foo, equals(foo[-5]))
29
expect_that(V(g)[[5]]$foo, equals(c(0,0,0,4,5)))
30
expect_that(V(g)[5]$foo, equals(list(c(0,0,0,4,5))))
33
V(g)[[5]]$foo[1:3] <- 0
34
expect_that(V(g)[(1:10)[-5]]$foo, equals(foo[-5]))
35
expect_that(V(g)[[5]]$foo, equals(c(0,0,0,4,5)))
36
expect_that(V(g)[5]$foo, equals(list(c(0,0,0,4,5))))
39
V(g)[5]$foo[[1]][1:3] <- 0
40
expect_that(V(g)[(1:10)[-5]]$foo, equals(foo[-5]))
41
expect_that(V(g)[[5]]$foo, equals(c(0,0,0,4,5)))
42
expect_that(V(g)[5]$foo, equals(list(c(0,0,0,4,5))))