Home
last modified time | relevance | path

Searched refs:assert (Results 1 – 25 of 204) sorted by relevance

123456789

/PHP-8.1/ext/standard/tests/assert/
H A Dassert04.phpt2 misc assert() tests tests
4 assert.active = 1
5 assert.warning = 1
6 assert.callback =
7 assert.bail = 0
8 assert.exception=0
13 assert(1);
19 assert(0);
24 assert(0);
30 Warning: assert(): assert(0) failed in %s on line %d
[all …]
H A Dassert.phpt2 assert()
4 assert.active = 0
5 assert.warning = 1
6 assert.callback =
7 assert.bail = 0
8 assert.exception=0
30 assert($a != 0);
33 assert($a != 0);
37 assert($a != 0);
40 assertion failed 21,"assert($a != 0)"
[all …]
H A Dassert_basic2.phpt2 assert() - basic - correct call back values before and after assert.
4 assert.active = 1
5 assert.warning = 1
6 assert.callback=f1
7 assert.bail = 0
8 assert.exception=0
22 assert(0);
26 assert(0);
32 Warning: assert(): assert(0) failed in %s on line 13
37 Warning: assert(): assert(0) failed in %s on line 17
H A Dassert_variation.phpt4 assert.active = 1
5 assert.warning = 0
6 assert.callback = f1
7 assert.bail = 0
8 assert.exception=0
38 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
45 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
53 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
109 string(6) "assert"
121 string(6) "assert"
[all …]
H A Dassert_basic.phpt2 assert() - basic - check that assert runs when assert.active is set to 1.
4 assert.active = 1
5 assert.warning = 0
6 assert.callback = f1
7 assert.bail = 0
8 assert.exception=0
16 var_dump($r2 = assert(0));
17 var_dump($r2 = assert(1));
H A Dassert_basic4.phpt4 assert.active = 0
5 assert.warning = 0
6 assert.bail = 0
7 assert.callback = f1
19 echo "Initial values: ini.get(\"assert.active\") => [".ini_get("assert.active")."]\n";
20 echo "Initial values: ini.get(\"assert.warning\") => [".ini_get("assert.warning")."]\n";
21 echo "Initial values: ini.get(\"assert.bail\") => [".ini_get("assert.bail")."]\n";
22 echo "Initial values: ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
29 Initial values: ini.get("assert.active") => [0]
30 Initial values: ini.get("assert.warning") => [0]
[all …]
H A Dassert03.phpt2 assert() - set callback using ini_set()
4 assert.active = 1
5 assert.warning = 0
6 assert.callback =
7 assert.bail = 0
8 assert.exception=0
27 assert($a != 0);
30 ini_set("assert.callback", "b");
31 assert($a != 0);
35 assertion failed - a - 18,"assert($a != 0)"
[all …]
H A Dassert_closures.phpt2 assert() - basic - accept closures as callback.
4 assert.active = 1
5 assert.warning = 1
6 assert.bail = 0
7 assert.exception=0
11 assert(0);
16 Warning: assert(): assert(0) failed in %s on line %d
H A Dassert_basic5.phpt2 assert() - basic - check switch on warnings using assert_options.
4 assert.active = 1
5 assert.warning = 0
6 assert.callback = f1
7 assert.bail = 0
8 assert.exception=0
18 var_dump($r2=assert(0 != 0));
19 var_dump($r2=assert(0 == 0));
28 Warning: assert(): assert(0 != 0) failed in %s on line %d
H A Dassert_basic1.phpt2 assert() - basic - check that assert can be switched off
4 assert.active = 0
5 assert.warning = 0
6 assert.callback = f1
7 assert.bail = 0
15 var_dump($r2=assert(0));
16 var_dump($r2=assert(1));
H A Dassert_basic3.phpt2 assert() - basic - Test that bailout works
4 assert.active = 1
5 assert.warning = 1
6 assert.callback = f1
7 assert.bail = 0
8 assert.exception=0
18 var_dump($r2=assert(0 != 0));
25 Warning: assert(): assert(0 != 0) failed in %s on line %d
H A Dassert_error2.phpt2 assert() - basic - Test that bailout works
4 assert.active = 1
5 assert.warning = 1
6 assert.callback = f1
7 assert.bail = 0
8 assert.exception=0
20 var_dump($r2 = assert(0 != 0));
27 Warning: assert(): assert(0 != 0) failed in %s on line %d
H A Dassert_basic6.phpt2 assert() - Remove the assert callback
4 assert.active=1
17 assert(false);
28 assert(false);
37 assert(false)
40 assert(false)
H A Dassert_return_value.phpt2 assert() returns boolean on success or failure
5 assert.exception = 0
8 var_dump(assert(true));
9 var_dump(assert(false));
14 Warning: assert(): assert(false) failed in %s on line %d
/PHP-8.1/Zend/tests/assert/
H A Dexpect_018.phpt5 assert.exception=0
11 var_dump(\assert(false));
12 var_dump(\assert(true));
13 var_dump(assert(false));
14 var_dump(assert(true));
16 var_dump(\assert(false));
17 var_dump(\assert(true));
18 var_dump(assert(false));
19 var_dump(assert(true));
27 Warning: assert(): assert(false) failed in %sexpect_018.php on line 10
[all …]
H A Dbug70528.phpt2 Bug #70528 (assert() with instanceof adds apostrophes around class name)
5 assert.exception=0
6 assert.warning=1
14 assert(new \stdClass instanceof $bar);
15 assert(new \stdClass instanceof Bar);
16 assert(new \stdClass instanceof \Foo\Bar);
19 Warning: assert(): assert(new \stdClass() instanceof $bar) failed in %sbug70528.php on line %d
21 Warning: assert(): assert(new \stdClass() instanceof Bar) failed in %sbug70528.php on line %d
23 Warning: assert(): assert(new \stdClass() instanceof \Foo\Bar) failed in %sbug70528.php on line %d
H A Dexpect_008.phpt5 assert.exception=1
10 assert($this || 0);
20 assert(true, "constant message");
21 assert(($variable && $variable) || php_sapi_name(), new OdEar("constant message"));
22 assert(false);
23 assert(blah(), blah());
29 assert (blah() || blah() || blah(), blah() || blah() || blah() || blah());
H A Dexpect_016.phpt5 assert.exception=0
9 var_dump(assert(false));
10 var_dump(assert(true));
12 var_dump(assert(false));
13 var_dump(assert(true));
20 Warning: assert(): assert(false) failed in %sexpect_016.php on line 6
/PHP-8.1/Zend/tests/attributes/
H A D012_ast_export.phpt5 assert.exception=0
6 assert.warning=1
10 assert(0 && ($a = #[A1] #[A2] function ($a, #[A3(1)] $b) { }));
12 assert(0 && ($a = #[A1(1, 2, 1 + 2)] fn () => 1));
14 assert(0 && ($a = new #[A1] class() {
20 assert(0 && ($a = function () {
28 Warning: assert(): assert(0 && ($a = #[A1] #[A2] function ($a, #[A3(1)] $b) {
31 Warning: assert(): assert(0 && ($a = #[A1(1, 2, 1 + 2)] fn() => 1)) failed in %s on line %d
33 Warning: assert(): assert(0 && ($a = new #[A1] class {
45 Warning: assert(): assert(0 && ($a = function () {
/PHP-8.1/Zend/tests/
H A Dfirst_class_callable_assert.phpt2 Acquire callable to assert()
8 $assert = assert(...);
9 $assert(1 == 1.0, "Message 1");
11 $assert(1 == 2.0, "Message 2");
17 assert(false && strlen(...));
25 assert(false && strlen(...))
H A Dexception_011.phpt4 assert.bail=1
5 assert.exception=1
11 assert(false);
20 Fatal error: Uncaught AssertionError: assert(false) in %sexception_011.php:%d
22 #0 %sexception_011.php(%d): assert(false, 'assert(false)')
/PHP-8.1/Zend/tests/arrow_functions/
H A D007.phpt5 assert.exception=0
10 assert((fn() => false)());
11 assert((fn&(int... $args): ?bool => $args[0])(false));
15 Warning: assert(): assert(fn() => false()) failed in %s on line %d
17 Warning: assert(): assert(fn&(int ...$args): ?bool => $args[0](false)) failed in %s on line %d
/PHP-8.1/ext/standard/
H A Dphp_assert.h20 PHP_MINIT_FUNCTION(assert);
21 PHP_MSHUTDOWN_FUNCTION(assert);
22 PHP_RINIT_FUNCTION(assert);
23 PHP_RSHUTDOWN_FUNCTION(assert);
24 PHP_MINFO_FUNCTION(assert);
/PHP-8.1/Zend/tests/named_params/
H A Dassert.phpt2 Calling assert with named params
6 assert(assertion: true);
8 assert(assertion: false);
13 assert(assertion: true, description: "Description");
15 assert(assertion: false, description: "Description");
21 assert(description: "Description");
28 assert(assertion: false)
/PHP-8.1/Zend/tests/numeric_strings/
H A Dtrailling_whitespaces.phpt31 \assert($i === 123);
34 \assert($f === 123.0);
38 \assert($string == 123);
40 \assert($num == 123);
43 \assert(\intdiv($string, 1) === 123);
44 \assert(\is_numeric($string));
47 \assert(\is_int($incremented) || \is_float($incremented));
48 \assert($incremented == 124);
51 \assert(\is_int($decremented) || \is_float($decremented));
52 \assert($decremented == 122);

Completed in 23 milliseconds

123456789