mirror of
https://github.com/php-win-ext/phpy.git
synced 2026-03-25 09:22:21 +01:00
22 lines
421 B
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);
|
|
}
|
|
}
|