Permalink
Browse files

Add more failing tests

  • Loading branch information...
1 parent 4c3f4e2 commit 4762410701b6dddedb83fbb5236e41625dfa6287 @colder committed Apr 11, 2012
Showing with 35 additions and 0 deletions.
  1. +16 −0 tests/weakref_008.phpt
  2. +19 −0 tests/weakref_009.phpt
View
@@ -0,0 +1,16 @@
+--TEST--
+Weakref: zval splitting causes crash
+--FILE--
+<?php
+$obj = new StdClass();
+$ref = new WeakRef($obj);
+echo "get...\n";
+$obj = $ref->get();
+echo "unset...\n";
+unset($ref);
+echo "done...\n";
+?>
+--EXPECTF--
+set...
+unset...
+done...
View
@@ -0,0 +1,19 @@
+--TEST--
+Weakref: zval splitting causes crash
+--FILE--
+<?php
+$obj = new StdClass();
+$ref = new WeakRef($obj);
+echo "get...\n";
+$obj2 = $ref->get();
+echo "unset1...\n";
+unset($obj);
+echo "unset2...\n";
+unset($ref);
+echo "done...\n";
+?>
+--EXPECTF--
+get...
+unset1...
+unset2...
+done...

0 comments on commit 4762410

Please sign in to comment.