TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
1.0 KiB

<?php
class OperatorTest extends \BaseTest
{
public function testLiteralIntDivideByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'divide-by-zero-int.php');
}
public function testLiteralFloatDivideByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'divide-by-zero-float.php');
}
public function testLiteralStringDivideByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'divide-by-zero-string.php');
}
public function testLiteralModuloByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'modulo-by-zero-int.php');
}
public function testLiteralDivideAssignByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'assign-divide-by-zero.php');
}
public function testLiteralModuloAssignByZeroDoesNotCompile(): void
{
$this->exec('Cannot divide or modulo by zero', 'assign-modulo-by-zero.php');
}
}