Re: test for an array

2003-09-30 Thread Eric Lease Morgan
Thank you for the prompt replies. On 9/30/03 5:18 PM, "Andy Lester" <[EMAIL PROTECTED]> wrote: > Rather than thinking of it in terms of what the function should > return, think of it as what you're expecting. For example, you might: > > my @vars =

Re: test for an array

2003-09-30 Thread Ed Summers
On Tue, Sep 30, 2003 at 04:56:30PM -0500, Eric Lease Morgan wrote: > is(ref($librarian->term_ids), 'ARRAY', 'set term_ids()'); Try Test::More's isa_ok(). It works on objects *and* references. isa_ok( $librarian->term_ids, 'ARRAY', 'set term_ids()' ); Eric++ for taking the time to do tests!

Re: test for an array

2003-09-30 Thread Andy Lester
At 4:56 PM -0500 9/30/03, Eric Lease Morgan wrote: How do I test for an array? I have written a module that gets and sets characteristics of an object, and I am using another module called Test::More to test my module. Two of my methods return arrays. One is a simple array of integers. The other i