php-kilo/tests/Type/PointTest.php
Timothy J. Warren 457560137d
All checks were successful
timw4mail/php-kilo/pipeline/head This commit looks good
Comments and tests
2021-04-14 19:00:37 -04:00

25 lines
471 B
PHP

<?php declare(strict_types=1);
namespace Aviat\Kilo\Tests\Type;
use Aviat\Kilo\Type\Point;
use PHPUnit\Framework\TestCase;
class PointTest extends TestCase {
public function testNewPoint(): void
{
$p = Point::new(1, 2);
$this->assertEquals(1, $p->x);
$this->assertEquals(2, $p->y);
}
public function testPointFrom(): void
{
$p = Point::new(3, 7);
$p2 = Point::from($p);
$this->assertEquals($p->x, $p2->x);
$this->assertEquals($p->y, $p2->y);
}
}