Re: [svn:PHP-Sandwich] r1452 - PHP-Sandwich/trunk/t
[email protected] (João Pedro Gonçalves) Wed, 3 Aug 2005 17:45:42 +0100
| Newsgroups | perl.php.sandwich.dev |
|---|---|
| Message-ID | <[email protected]> |
Works great, thanks! Jo=E3o Pedro Gon=E7alves SAPO On Aug 3, 2005, at 17:44, [email protected] wrote: > Author: gschlossnagle > Date: Wed Aug 3 09:44:39 2005 > New Revision: 1452 > > Modified: > PHP-Sandwich/trunk/t/16.t > Log: > Add test for write access segfault (joao gonclaves) > > > Modified: PHP-Sandwich/trunk/t/16.t > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 > =3D=3D=3D=3D=3D=3D=3D > --- PHP-Sandwich/trunk/t/16.t (original) > +++ PHP-Sandwich/trunk/t/16.t Wed Aug 3 09:44:39 2005 > @@ -1,6 +1,6 @@ > #!/opt/ecelerity/3rdParty/bin/perl -w > use strict; > -use Test::More tests =3D> 6; > +use Test::More tests =3D> 9; > > BEGIN { > diag "Testing passing blessed references into PHP"; > @@ -21,6 +21,12 @@ function property_access($obj, $prop) > return $obj->$prop; > } > > +function property_write($obj, $prop, $value) > +{ > + return $obj->$prop =3D $value; > +} > + > + > function method_call($obj, $meth) > { > return $obj->$meth(); > @@ -41,6 +47,9 @@ $foo->{bar} =3D 'bar'; > $foo->{baz} =3D 'baz'; > is $p->get_class($foo), 'PerlSV::Foo', 'Checking class name'; > is $p->property_access($foo, 'bar'), 'bar', 'Checking property =20 > access'; > +ok $p->property_write($foo, 'bar', 'foo'), 'Checking property write =20= > access'; > +is $p->property_access($foo, 'bar'), 'foo', 'Checking property =20 > access'; > +ok $p->property_write($foo, 'bar', 'bar'), 'Checking property write =20= > access'; > is $p->method_call($foo, 'get'), 'bar', 'Checking method calls'; > is_deeply $p->props_as_array($foo), {'bar' =3D> 'bar', 'baz' =3D> = 'baz'}, =20 > 'Checking iterators'; > package Foo;