Skip to content

Commit

Permalink
test: Reenable serialization test (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored May 28, 2023
2 parents 4a7df66 + 77da69a commit d9afc66
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/testthat/_snaps/serialize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# serialization works

Code
g
Output
IGRAPH D--- 3 3 -- Ring graph
+ attr: name (g/c), mutual (g/l), circular (g/l)
+ edges:
[1] 1->2 2->3 3->1
Code
gs
Output
IGRAPH D--- 3 3 -- Ring graph
+ attr: name (g/c), mutual (g/l), circular (g/l)
+ edges:
[1] 1->2 2->3 3->1

5 changes: 5 additions & 0 deletions tests/testthat/test-serialize.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ test_that("serialization works", {
gs <- unserialize(serialize(g, NULL))

expect_identical(unclass(g)[-igraph_t_idx_env], unclass(gs)[-igraph_t_idx_env])

expect_snapshot({
g
gs
})
})

0 comments on commit d9afc66

Please sign in to comment.