fix .gitignore
This commit is contained in:
parent
9e4f51e488
commit
9f62653cea
|
@ -28,11 +28,11 @@ missing
|
|||
mkinstalldirs
|
||||
modules
|
||||
run-tests.php
|
||||
tests/*/*.diff
|
||||
tests/*/*.out
|
||||
tests/*/*.php
|
||||
tests/*/*.exp
|
||||
tests/*/*.log
|
||||
tests/*/*.sh
|
||||
tests/*.diff
|
||||
tests/*.out
|
||||
tests/*.php
|
||||
tests/*.exp
|
||||
tests/*.log
|
||||
tests/*.sh
|
||||
.idea/
|
||||
.vscode/
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Print message if test fail.
|
||||
*
|
||||
* @param string $test
|
||||
* @param array $cases
|
||||
* @return bool
|
||||
*/
|
||||
function batch_assert($test, ...$cases) {
|
||||
foreach ($cases as $case) {
|
||||
[$expected, $got] = $case;
|
||||
if ($expected == $got) {
|
||||
continue;
|
||||
}
|
||||
echo "Test for $test failed.\n";
|
||||
$expected = var_export($expected, true);
|
||||
$got = var_export($got, true);
|
||||
echo "Expected:\n$expected\n";
|
||||
echo "Got:\n$got\n";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?php
|
||||
|
||||
if (!extension_loaded('arma')) {
|
||||
echo 'skip armadillo extension is not loaded.';
|
||||
}
|
Reference in New Issue