Files
phpy/tests/phpunit/IntTest.php

22 lines
421 B
PHP

<?php
use PHPUnit\Framework\TestCase;
class IntTest extends TestCase
{
function testIntOverflow()
{
$i = PyCore::int(12345435);
$this->assertEquals(strval($i->__pow__(3)), '1881564851360655187875');
}
function testEnum()
{
$m = PyCore::import('app.user');
$v = $m->Color->GREEN;
$this->assertIsNotInt($v);
$this->assertEquals($v->value, 3);
}
}