-
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Test\Properties; | ||
|
||
class PropertyUpdate | ||
{ | ||
public p1; | ||
|
||
public function update1() { | ||
let this->p1[] = "aaa"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Zephir. | ||
* | ||
* (c) Zephir Team <team@zephir-lang.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Extension\Properties; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Test\Properties\PropertyUpdate; | ||
|
||
class PropertyUpdateTest extends TestCase | ||
{ | ||
public function testUpdate11() | ||
{ | ||
// before fixed. Assertion failed: (((ht)->gc.refcount == 1) || ((ht)->u.flags & (1<<6))), function _zend_hash_index_add_or_update_i | ||
$t = new PropertyUpdate(); | ||
$t->p1 = [111]; | ||
$t->update1(); | ||
|
||
$this->assertSame($t->p1, [111, 'aaa']); | ||
} | ||
} |
1f6962d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrysanthemum Just got
(((ht)->gc.refcount == 1) || ((ht)->u.flags & (1<<6)))
assertion here.Commit: 1cacb6c
PHP: 7.2.20 (cli) ( ZTS DEBUG )
Test: