Skip to content

Commit

Permalink
add tests for chained syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Se committed Nov 30, 2023
1 parent 0a80494 commit 560d187
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions inst/tinytest/test_chain.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
`:=` <- expect_identical

x = 5
c <- (x ? num ? 1 ~ 2)
c := 1
c <- (x ?~ chr ?! chr ? 1 ~ 2)
c := 2
x?chr || x?dbl := TRUE

x = c(T, F, NA)
y = 1:3
z = 7:9

(x ? (!x ? y ~ z) ~ y) := c(7L, 2L, NA_integer_)

0 comments on commit 560d187

Please sign in to comment.