lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r930350 - /lucene/lucy/trunk/clownfish/t/400-class.t
Date Fri, 02 Apr 2010 18:30:12 GMT
Author: marvin
Date: Fri Apr  2 18:30:12 2010
New Revision: 930350

URL: http://svn.apache.org/viewvc?rev=930350&view=rev
Log:
Add a test for detecting the discard of the nullable parameter.  (Contributed
by Peter Karman.)

Modified:
    lucene/lucy/trunk/clownfish/t/400-class.t

Modified: lucene/lucy/trunk/clownfish/t/400-class.t
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/clownfish/t/400-class.t?rev=930350&r1=930349&r2=930350&view=diff
==============================================================================
--- lucene/lucy/trunk/clownfish/t/400-class.t (original)
+++ lucene/lucy/trunk/clownfish/t/400-class.t Fri Apr  2 18:30:12 2010
@@ -1,7 +1,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 51;
+use Test::More tests => 53;
 use Clownfish::Class;
 use Clownfish::Parser;
 
@@ -164,6 +164,8 @@ $class_content = q|
         public Thing      *Fetch(Dog *self, Thing *thing);
         public final void  Bury(Dog *self, Bone *bone);
         public Owner      *mom;
+        public abstract incremented nullable Thing*
+        Scratch(Dog *self);
 
         i32_t[1]  flexible_array_at_end_of_struct;
     }
@@ -185,8 +187,16 @@ ok( ( scalar grep { $_->micro_sym eq 'de
     "parsed parcel method" );
 ok( ( scalar grep { $_->micro_sym eq 'bury' } $class->methods ),
     "parsed public method" );
+ok( ( scalar grep { $_->micro_sym eq 'scratch' } $class->methods ),
+    "parsed public abstract nullable method" );
+for my $method ($class->methods) {
+    if ($method->micro_sym eq 'scratch') {
+        ok( $method->{return_type}->nullable, 
+            "public abstract incremented nullable flagged as nullable");
+    }
+}
 is( ( scalar grep { $_->public } $class->methods ),
-    5, "pass acl to Method constructor" );
+    6, "pass acl to Method constructor" );
 ok( $class->has_attribute('lovable'), "parsed class attribute" );
 ok( $class->has_attribute('drooly'),  "parsed second class attribute" );
 



Mime
View raw message