Lines Matching refs:obj
45 my $obj = Overloaded->new('foo', 42);
46 isa_ok $obj, 'Overloaded';
48 cmp_ok $obj, 'eq', 'foo', 'cmp_ok() eq';
49 is $obj->{stringify}, 0, ' does not stringify';
50 is $obj, 'foo', 'is() with string overloading';
51 cmp_ok $obj, '==', 42, 'cmp_ok() with number overloading';
52 is $obj->{numify}, 0, ' does not numify';
54 is_deeply [$obj], ['foo'], 'is_deeply with string overloading';
55 ok eq_array([$obj], ['foo']), 'eq_array ...';
56 ok eq_hash({foo => $obj}, {foo => 'foo'}), 'eq_hash ...';
59 is_deeply $obj, 'foo', 'is_deeply with string overloading at the top';
61 Test::More->builder->is_num($obj, 42);
62 Test::More->builder->is_eq ($obj, "foo");
80 my $obj = Overloaded->new('0', 42);
81 isa_ok $obj, 'Overloaded';
83 cmp_ok $obj, 'eq', '0', 'cmp_ok() eq';
84 is $obj->{stringify}, 0, ' does not stringify';
85 is $obj, '0', 'is() with string overloading';