mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-15 23:41:57 +00:00
47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
desc: Test named aliases for math and logic operators
|
|
tests:
|
|
|
|
- cd:
|
|
- r.expr(0).add(1)
|
|
- r.add(0, 1)
|
|
- r.expr(2).sub(1)
|
|
- r.sub(2, 1)
|
|
- r.expr(2).div(2)
|
|
- r.div(2, 2)
|
|
- r.expr(1).mul(1)
|
|
- r.mul(1, 1)
|
|
- r.expr(1).mod(2)
|
|
- r.mod(1, 2)
|
|
ot: 1
|
|
|
|
- cd:
|
|
- r.expr(True).and(True)
|
|
- r.expr(True).or(True)
|
|
- r.and(True, True)
|
|
- r.or(True, True)
|
|
- r.expr(False).not()
|
|
- r.not(False)
|
|
py:
|
|
- r.expr(True).and_(True)
|
|
- r.expr(True).or_(True)
|
|
- r.and_(True, True)
|
|
- r.or_(True, True)
|
|
- r.expr(False).not_()
|
|
- r.not_(False)
|
|
ot: True
|
|
|
|
- cd:
|
|
- r.expr(1).eq(1)
|
|
- r.expr(1).ne(2)
|
|
- r.expr(1).lt(2)
|
|
- r.expr(1).gt(0)
|
|
- r.expr(1).le(1)
|
|
- r.expr(1).ge(1)
|
|
- r.eq(1, 1)
|
|
- r.ne(1, 2)
|
|
- r.lt(1, 2)
|
|
- r.gt(1, 0)
|
|
- r.le(1, 1)
|
|
- r.ge(1, 1)
|
|
ot: True
|