Add assertion test.
所有检测均成功
The build was successful.

这个提交包含在:
2019-04-10 09:23:23 +02:00
父节点 d6434ba19e
当前提交 6b86f4c855
共有 2 个文件被更改,包括 20 次插入0 次删除

19
tests/assertion_test.aer 普通文件
查看文件

@@ -0,0 +1,19 @@
class Program {
void test_assert(mixed $param) {
assert("is_bool($param);");
}
void main() {
callback $a = void(string $file, int $line, string $code) {
print("Assertion failed ...\n");
};
assert_options(ASSERT_ACTIVE, true);
assert_options(ASSERT_BAIL, false);
assert_options(ASSERT_WARNING, false);
assert_options(ASSERT_CALLBACK, $a);
$this->test_assert(true);
$this->test_assert(1);
}
}

1
tests/assertion_test.exp 普通文件
查看文件

@@ -0,0 +1 @@
Assertion failed ...