File: test-infix.1.R

package info (click to toggle)
r-cran-lambda.r 1.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 284 kB
  • sloc: sh: 9; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
rm(list=ls())

assert('infix.1', {
  a %mod% b %:=% { a %/% b }
  seal(`%mod%`)

  act <- 5 %mod% 2
  exp <- 5 %/% 2
  (act == exp)
})

assert('infix.2', {
  a %mod% b %as% { a %/% b }
  seal(`%mod%`)

  act <- 5 %mod% 2
  exp <- 5 %/% 2
  (act == exp)
})