develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [PATCH] extra tests for t/op/tie.t

Thread Previous | Thread Next
From:
Bram
Date:
April 30, 2008 02:14
Subject:
Re: [PATCH] extra tests for t/op/tie.t
Message ID:
20080430111331.hnjix7kqyskw8gsc@horde.wizbit.be
Quoting Bram <p5p@perl.wizbit.be>:

>>> I don't know which source code change changed this behaviour.
>>
>> See patch 27633 which introduced a test marking that the READONLY    
>>  bug had been fixed, but I counted tell which source code change  
>> had    fixed it.
>>
>
> Attached patch adds 3 tests to make sure the output stays the same.

Tests for ^, & and ~ are also needed but t/op/bop.t has similar tests  
to detect double magic:

tie $x, "main", 1;
tie $y, "main", 3;

is(($x | $y), 3);
is(fetches($x), 1);
is(fetches($y), 1);
is(stores($x), 0);
is(stores($y), 0);

is(($x & $y), 1);
is(fetches($x), 1);
is(fetches($y), 1);
is(stores($x), 0);
is(stores($y), 0);


Would it be a good idea to modify these tests so that the testing  
happens there?

This would mean changing the tests so that is uses a better number -  
12 and 14 instead of 1 and 3 and re-doing the tie before each test.


Any thoughts?

Kind regards,

Bram



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About