Skip to content

Commit

Permalink
test: fold test-chung_lu into test-games
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Dec 13, 2024
1 parent e7c6c38 commit c81b8c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
13 changes: 0 additions & 13 deletions tests/testthat/test-chung_lu.R

This file was deleted.

14 changes: 14 additions & 0 deletions tests/testthat/test-games.R
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,17 @@ test_that("HSBM with list arguments works", {
)
expect_equal(gg1[] + gg2[], gg22[])
})

test_that("sample_chung_lu works", {
g <- sample_chung_lu(c(3, 3, 2, 2, 1, 1))
expect_false(any_multiple(g))

g <- sample_chung_lu(c(3, 3, 2, 2, 1, 1), loops = FALSE, variant = 'original')
expect_true(is_simple(g))

g <- sample_chung_lu(c(3, 3, 2, 2, 1, 1), loops = FALSE, variant = 'maxent')
expect_true(is_simple(g))

g <- sample_chung_lu(c(3, 3, 2, 2, 1, 1), loops = FALSE, variant = 'nr')
expect_true(is_simple(g))
})

0 comments on commit c81b8c1

Please sign in to comment.