Skip to content

Commit 0a1fbec

Browse files
TESTS: No need to use stop_if_not()
1 parent 80f2b4a commit 0a1fbec

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

inst/testme/test-db_state.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
db_state <- future.tests:::db_state
2-
stop_if_not <- future.tests:::stop_if_not
32
options(future.tests.debug = TRUE)
43

54
message("*** db_state() ...")
@@ -12,7 +11,7 @@ str(res)
1211

1312
stack <- db_state("list")
1413
str(stack)
15-
stop_if_not(length(stack) == 1L)
14+
stopifnot(length(stack) == 1L)
1615

1716
res <- db_state("push", title = "abc")
1817
str(res)
@@ -22,27 +21,27 @@ Sys.setenv(BAR = "3.14")
2221

2322
stack <- db_state("list")
2423
str(stack)
25-
stop_if_not(length(stack) == 2L)
24+
stopifnot(length(stack) == 2L)
2625

2726
res <- db_state("push", title = "def")
2827
str(res)
2928

3029
stack <- db_state("list")
3130
str(stack)
32-
stop_if_not(length(stack) == 3L)
31+
stopifnot(length(stack) == 3L)
3332

3433
res <- db_state("pop")
3534
str(res)
3635

3736
stack <- db_state("list")
3837
str(stack)
39-
stop_if_not(length(stack) == 2L)
38+
stopifnot(length(stack) == 2L)
4039

4140
res <- db_state("pop")
4241
str(res)
4342

4443
stack <- db_state("list")
4544
str(stack)
46-
stop_if_not(length(stack) == 1L)
45+
stopifnot(length(stack) == 1L)
4746

4847
message("*** db_state() ... DONE")

0 commit comments

Comments
 (0)