diff options
author | Bo Yang <teboring@google.com> | 2016-10-05 10:54:39 -0700 |
---|---|---|
committer | Bo Yang <teboring@google.com> | 2016-10-10 11:44:54 -0700 |
commit | 4f3d20a500e75ef47004986fece3db20ddeee43f (patch) | |
tree | c4fa543a4ebae98c3762270edf3c3c07211782ce /php/tests | |
parent | 1e5d4ba9387362ece026e78148f4ac5881537e64 (diff) | |
download | protobuf-4f3d20a500e75ef47004986fece3db20ddeee43f.tar.gz protobuf-4f3d20a500e75ef47004986fece3db20ddeee43f.tar.bz2 protobuf-4f3d20a500e75ef47004986fece3db20ddeee43f.zip |
Fix segmentation fault when ZTS is defined.
Diffstat (limited to 'php/tests')
-rw-r--r-- | php/tests/array_test.php | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/php/tests/array_test.php b/php/tests/array_test.php index d683add5..09d4dc82 100644 --- a/php/tests/array_test.php +++ b/php/tests/array_test.php @@ -789,26 +789,26 @@ class RepeatedFieldTest extends PHPUnit_Framework_TestCase $this->assertSame(1, count($arr)); } - public function testInsertRemoval() - { - $arr = new RepeatedField(GPBType::INT32); - - $arr []= 0; - $arr []= 1; - $arr []= 2; - $this->assertSame(3, count($arr)); - - unset($arr[2]); - $this->assertSame(2, count($arr)); - $this->assertSame(0, $arr[0]); - $this->assertSame(1, $arr[1]); - - $arr [] = 3; - $this->assertSame(3, count($arr)); - $this->assertSame(0, $arr[0]); - $this->assertSame(1, $arr[1]); - $this->assertSame(3, $arr[2]); - } + public function testInsertRemoval() + { + $arr = new RepeatedField(GPBType::INT32); + + $arr []= 0; + $arr []= 1; + $arr []= 2; + $this->assertSame(3, count($arr)); + + unset($arr[2]); + $this->assertSame(2, count($arr)); + $this->assertSame(0, $arr[0]); + $this->assertSame(1, $arr[1]); + + $arr [] = 3; + $this->assertSame(3, count($arr)); + $this->assertSame(0, $arr[0]); + $this->assertSame(1, $arr[1]); + $this->assertSame(3, $arr[2]); + } /** * @expectedException PHPUnit_Framework_Error |