You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/05/18 21:29:34 UTC
[08/10] lucy-clownfish git commit: Test Perl operator overloading of
Err objects
Test Perl operator overloading of Err objects
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f87eb6e2
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f87eb6e2
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f87eb6e2
Branch: refs/heads/master
Commit: f87eb6e23932c717a4c9de630d97d4ac4264fef3
Parents: 2aac5c2
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue May 12 17:52:15 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon May 18 21:25:33 2015 +0200
----------------------------------------------------------------------
runtime/perl/t/binding/034-err.t | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f87eb6e2/runtime/perl/t/binding/034-err.t
----------------------------------------------------------------------
diff --git a/runtime/perl/t/binding/034-err.t b/runtime/perl/t/binding/034-err.t
index ae91063..84b7d36 100644
--- a/runtime/perl/t/binding/034-err.t
+++ b/runtime/perl/t/binding/034-err.t
@@ -27,10 +27,13 @@ package GloriousDeath;
use base qw( Clownfish::Err );
package main;
-use Test::More tests => 10;
+use Test::More tests => 12;
-isa_ok( Clownfish::Err->new("Bad stuff happened"),
- 'Clownfish::Err', "new" );
+my $err = Clownfish::Err->new("Bad stuff happened");
+isa_ok( $err, 'Clownfish::Err', "new" );
+my $mess = $err->get_mess;
+is( "$err", $mess, "Err stringification works" );
+ok( $err eq $mess, "Err eq overload works" );
my $glorious = GloriousDeath->new("Banzai");
isa_ok( $glorious, 'GloriousDeath', "subclass" );