Skip to content

Commit

Permalink
Re-add failing test
Browse files Browse the repository at this point in the history
This reverts commit 84fb514.
  • Loading branch information
krlmlr committed May 21, 2023
1 parent bced088 commit 342586e
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 342586e

Please sign in to comment.