mediawiki-extensions-AbuseF.../tests/parserTests/cast.t
Daimona Eaytoy a7b28369ea Expand the list of types that can be cast to int
Bug: T237624
Change-Id: I2220cb8a8ec998a433a4469d7e0591ec0b4f2b12
2019-11-07 15:14:17 +01:00

18 lines
390 B
Perl

(string(1) === "1") &
(int("1") === 1) &
(float(1) === 1.0) &
bool(1) & !bool(0) &
bool([]) === false &
bool( [false] ) === true &
bool( [1,2,3,4,5,6] ) === true &
float([]) === 0.0 &
float( [false] ) === 1.0 &
float( [1,2,3,4,5,6] ) === 6.0 &
int([]) === 0 &
int( [false] ) === 1 &
int( [1,2,3,4,5,6] ) === 6 &
true + true === 2 &
null - null === 0 &
true * false === 0 &
163 % true === 0