29 lines
399 B
PHP
29 lines
399 B
PHP
--TEST--
|
|
Test for class `DiagView`.
|
|
--SKIPIF--
|
|
<?php
|
|
require_once 'includes/loaded.php';
|
|
is_php_arma_loaded();
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$mat = Arma\IMat::fromString("1 2; 3 4");
|
|
|
|
$diag = $mat->diag();
|
|
$diag->rawPrint();
|
|
|
|
$diag->at(1)->setTo($diag->at(0)->val());
|
|
$mat->rawPrint();
|
|
|
|
// When parent class is destroyed...
|
|
Arma\IMat::fromString("1 2; 3 4")->diag(-1)->rawPrint();
|
|
|
|
?>
|
|
--EXPECT--
|
|
1
|
|
4
|
|
1 2
|
|
3 1
|
|
3
|