update test cases.

This commit is contained in:
CismonX 2019-05-30 12:57:22 +08:00
parent 57a3d1871d
commit 79fbb7cb21
1 changed files with 3 additions and 3 deletions

View File

@ -13,18 +13,18 @@ require_once 'includes/assert.php';
$file_name = 'test_mat_data';
$mat = Arma\CxDMat::fromString('(1 2) (3 4); (5 6) (7 8)');
batch_assert('saving/loading of `Arma\\Mat`',
batch_assert('saving of `Arma\\Mat`',
[true, $mat->save($file_name, Arma\FileType::ARMA_BINARY)]
);
$mat1 = Arma\CxDMat::init();
$handle = fopen($file_name, 'r');
batch_assert('saving/loading of `Arma\\Mat`',
batch_assert('loading of `Arma\\Mat`',
[true, $mat1->load($handle, Arma\FileType::ARMA_BINARY)]
);
$eq_mat = $mat->equals($mat1);
batch_assert('saving/loading of `Arma\\Mat`',
batch_assert('loading of `Arma\\Mat`',
[1, $eq_mat->min()],
[1, $eq_mat->max()]
);