You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/12/15 07:38:30 UTC

[lucy-commits] svn commit: r1214631 - in /incubator/lucy/trunk/clownfish/perl/t: 051-symbol.t 100-type.t 400-class.t 600-parser.t

Author: marvin
Date: Thu Dec 15 06:38:29 2011
New Revision: 1214631

URL: http://svn.apache.org/viewvc?rev=1214631&view=rev
Log:
Prepare tests for new binding strategy.

Some tests have been assuming that a CFC object will always be associated with
one and only one Perl object.  That will soon no longer be the case, so test
using inner CFC objects rather than the Perl wrapper object.

Modified:
    incubator/lucy/trunk/clownfish/perl/t/051-symbol.t
    incubator/lucy/trunk/clownfish/perl/t/100-type.t
    incubator/lucy/trunk/clownfish/perl/t/400-class.t
    incubator/lucy/trunk/clownfish/perl/t/600-parser.t

Modified: incubator/lucy/trunk/clownfish/perl/t/051-symbol.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/051-symbol.t?rev=1214631&r1=1214630&r2=1214631&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/051-symbol.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/051-symbol.t Thu Dec 15 06:38:29 2011
@@ -49,7 +49,7 @@ ok( !$public_exposure->equals($parcel_ex
 
 my $lucifer_parcel = Clownfish::Parcel->singleton( name => 'Lucifer' );
 my $lucifer = new_symbol( parcel => 'Lucifer' );
-ok( $lucifer_parcel == $lucifer->get_parcel, "derive parcel" );
+ok( $$lucifer_parcel == ${ $lucifer->get_parcel }, "derive parcel" );
 is( $lucifer->get_prefix, "lucifer_", "get_prefix" );
 is( $lucifer->get_Prefix, "Lucifer_", "get_Prefix" );
 is( $lucifer->get_PREFIX, "LUCIFER_", "get_PREFIX" );

Modified: incubator/lucy/trunk/clownfish/perl/t/100-type.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/100-type.t?rev=1214631&r1=1214630&r2=1214631&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/100-type.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/100-type.t Thu Dec 15 06:38:29 2011
@@ -22,7 +22,7 @@ use Clownfish::Parcel;
 my $neato_parcel = Clownfish::Parcel->singleton( name => 'Neato' );
 
 my $type = Clownfish::Type->new( parcel => 'Neato', specifier => 'mytype_t' );
-is( $type->get_parcel, $neato_parcel,
+is( ${ $type->get_parcel }, $$neato_parcel,
     "constructor changes parcel name to Parcel singleton" );
 
 is( $type->to_c, '', "to_c()" );

Modified: incubator/lucy/trunk/clownfish/perl/t/400-class.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/400-class.t?rev=1214631&r1=1214630&r2=1214631&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/400-class.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/400-class.t Thu Dec 15 06:38:29 2011
@@ -56,7 +56,7 @@ my $should_be_foo = Clownfish::Class->fe
     parcel     => 'Neato',
     class_name => 'Foo',
 );
-is( $foo, $should_be_foo, "fetch_singleton" );
+is( $$foo, $$should_be_foo, "fetch_singleton" );
 
 my $foo_jr = Clownfish::Class->create(
     parcel            => 'Neato',
@@ -116,10 +116,10 @@ like( $@, qr/grow_tree/, "call grow_tree
 eval { $foo_jr->add_method($do_stuff) };
 like( $@, qr/grow_tree/, "Forbid add_method after grow_tree." );
 
-is( $foo_jr->get_parent,            $foo,      "grow_tree, one level" );
-is( $final_foo->get_parent,         $foo_jr,   "grow_tree, two levels" );
-is( $foo->novel_method("Do_Stuff"), $do_stuff, 'novel_method' );
-is( $foo_jr->method("Do_Stuff"),    $do_stuff, "inherited method" );
+is( ${ $foo_jr->get_parent },    $$foo,    "grow_tree, one level" );
+is( ${ $final_foo->get_parent }, $$foo_jr, "grow_tree, two levels" );
+is( ${ $foo->novel_method("Do_Stuff") }, $$do_stuff, 'novel_method' );
+is( ${ $foo_jr->method("Do_Stuff") },    $$do_stuff, "inherited method" );
 ok( !$foo_jr->novel_method("Do_Stuff"),    'inherited method not novel' );
 ok( $final_foo->method("Do_Stuff")->final, "Finalize inherited method" );
 ok( !$foo_jr->method("Do_Stuff")->final, "Don't finalize method in parent" );

Modified: incubator/lucy/trunk/clownfish/perl/t/600-parser.t
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/t/600-parser.t?rev=1214631&r1=1214630&r2=1214631&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/t/600-parser.t (original)
+++ incubator/lucy/trunk/clownfish/perl/t/600-parser.t Thu Dec 15 06:38:29 2011
@@ -31,8 +31,8 @@ isa_ok( $parser->parse("parcel Crustacea
 # Set and leave parcel.
 my $parcel = $parser->parse('parcel Crustacean cnick Crust;')
     or die "failed to process parcel_definition";
-is( Clownfish::Parser->get_parcel,
-    $parcel, "parcel_definition sets internal \$parcel var" );
+is( ${ Clownfish::Parser->get_parcel },
+    $$parcel, "parcel_definition sets internal \$parcel var" );
 
 for (qw( foo _foo foo_yoo FOO Foo fOO f00 foo_foo_foo )) {
     my $var = $parser->parse("int32_t $_;");