Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fnattino committed Dec 6, 2024
1 parent 8cbf9cc commit 21a8f32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-stroke.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test_that("a stroke is found in a very simple network", {

test_that("a ring is recognized as a stroke", {
sfc <- sf::st_sfc(l2, l4, l6, l7)
expected <- sf::st_sfc(sf::st_linestring(c(p3, p6, p5, p2, p3)))
expected <- sf::st_sfc(sf::st_linestring(c(p2, p3, p6, p5, p2)))
actual <- stroke(sfc)
expect_setequal(actual, expected)
})
Expand Down Expand Up @@ -145,7 +145,7 @@ test_that("edges are not split if flow_mode is true", {

test_that("a ring is recognized as a stroke also in flow_mode", {
sfc <- sf::st_sfc(l2, l4, l6, l7)
expected <- sf::st_sfc(sf::st_linestring(c(p3, p6, p5, p2, p3)))
expected <- sf::st_sfc(sf::st_linestring(c(p2, p3, p6, p5, p2)))
actual <- stroke(sfc, flow_mode = TRUE)
expect_setequal(actual, expected)
})
Expand Down Expand Up @@ -191,7 +191,7 @@ test_that("attributes can't be returned if edge is specified", {

test_that("a ring is recognized when from_edge is specified", {
sfc <- sf::st_sfc(l2, l4, l6, l7)
expected <- sf::st_sfc(sf::st_linestring(c(p3, p6, p5, p2, p3)))
expected <- sf::st_sfc(sf::st_linestring(c(p2, p3, p6, p5, p2)))
actual <- stroke(sfc, from_edge = 1)
expect_setequal(actual, expected)
})

0 comments on commit 21a8f32

Please sign in to comment.