Mailing List Archive

r3826 - in trunk/perl: . lib/KinoSearch lib/KinoSearch/Test t
Author: creamyg
Date: 2008-09-06 12:12:36 -0700 (Sat, 06 Sep 2008)
New Revision: 3826

Added:
trunk/perl/lib/KinoSearch/Test.pm
Removed:
trunk/perl/lib/KinoSearch/Test/TestQueryParser.pm
trunk/perl/lib/KinoSearch/Test/TestQueryParserLogic.pm
trunk/perl/lib/KinoSearch/Test/TestQueryParserSyntax.pm
Modified:
trunk/perl/MANIFEST
trunk/perl/t/610-queryparser_logic.t
trunk/perl/t/611-queryparser_syntax.t
Log:
Add KinoSearch::Test perl module, replacing TestQueryParserSyntax,
TestQueryParserLogic, and TestQueryParser.


Modified: trunk/perl/MANIFEST
===================================================================
--- trunk/perl/MANIFEST 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/MANIFEST 2008-09-06 19:12:36 UTC (rev 3826)
@@ -140,9 +140,7 @@
lib/KinoSearch/Store/RAMFileDes.pm
lib/KinoSearch/Store/RAMFolder.pm
lib/KinoSearch/Store/SharedLock.pm
-lib/KinoSearch/Test/TestQueryParser.pm
-lib/KinoSearch/Test/TestQueryParserLogic.pm
-lib/KinoSearch/Test/TestQueryParserSyntax.pm
+lib/KinoSearch/Test.pm
lib/KinoSearch/Test/TestSchema.pm
lib/KinoSearch/Test/TestUtils.pm
lib/KinoSearch/Test/Util/BBSortEx.pm

Deleted: trunk/perl/lib/KinoSearch/Test/TestQueryParser.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Test/TestQueryParser.pm 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/lib/KinoSearch/Test/TestQueryParser.pm 2008-09-06 19:12:36 UTC (rev 3826)
@@ -1,45 +0,0 @@
-use strict;
-use warnings;
-
-package KinoSearch::Test::TestQueryParser;
-use KinoSearch::Util::ToolSet qw( to_perl );
-BEGIN {
- push our @ISA, 'Exporter';
- our @EXPORT_OK = qw( doc_set );
-}
-
-sub doc_set { return to_perl( _doc_set() ) }
-
-1;
-
-__END__
-
-__AUTO_XS__
-
-{ "KinoSearch::Test::TestQueryParser" => {
- bind_methods => [.
- qw( Get_Query_String
- Get_Tree
- Get_Expanded
- Get_Num_Hits ),
- ],
- }
-}
-
-__XS__
-
-MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParser
-
-SV*
-_doc_set()
-CODE:
- KOBJ_TO_SV_NOINC( kino_TestQP_doc_set(), RETVAL );
-OUTPUT: RETVAL
-
-__COPYRIGHT__
-
-Copyright 2005-2008 Marvin Humphrey
-
-This program is free software; you can redistribute it and/or modify
-under the same terms as Perl itself.
-

Deleted: trunk/perl/lib/KinoSearch/Test/TestQueryParserLogic.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Test/TestQueryParserLogic.pm 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/lib/KinoSearch/Test/TestQueryParserLogic.pm 2008-09-06 19:12:36 UTC (rev 3826)
@@ -1,23 +0,0 @@
-use KinoSearch;
-
-1;
-
-__END__
-
-__XS__
-
-MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParserLogic
-
-void
-run_tests(invindex)
- kino_InvIndex *invindex;
-PPCODE:
- kino_TestQPLogic_run_tests(invindex);
-
-__COPYRIGHT__
-
-Copyright 2005-2008 Marvin Humphrey
-
-This program is free software; you can redistribute it and/or modify
-under the same terms as Perl itself.
-

Deleted: trunk/perl/lib/KinoSearch/Test/TestQueryParserSyntax.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Test/TestQueryParserSyntax.pm 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/lib/KinoSearch/Test/TestQueryParserSyntax.pm 2008-09-06 19:12:36 UTC (rev 3826)
@@ -1,34 +0,0 @@
-use strict;
-use warnings;
-
-package KinoSearch::Test::TestQueryParserSyntax;
-use KinoSearch::Util::ToolSet qw( to_perl );
-BEGIN {
- push our @ISA, 'Exporter';
- our @EXPORT_OK = qw( leaf_tests syntax_tests );
-}
-
-sub leaf_tests { to_perl( _leaf_tests() ) }
-sub syntax_tests { to_perl( _syntax_tests() ) }
-
-1;
-
-__END__
-
-__XS__
-
-MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParserSyntax
-
-void
-run_tests(invindex);
- kino_InvIndex *invindex;
-PPCODE:
- kino_TestQPSyntax_run_tests(invindex);
-
-__COPYRIGHT__
-
-Copyright 2005-2008 Marvin Humphrey
-
-This program is free software; you can redistribute it and/or modify
-under the same terms as Perl itself.
-

Added: trunk/perl/lib/KinoSearch/Test.pm
===================================================================
--- trunk/perl/lib/KinoSearch/Test.pm (rev 0)
+++ trunk/perl/lib/KinoSearch/Test.pm 2008-09-06 19:12:36 UTC (rev 3826)
@@ -0,0 +1,39 @@
+use KinoSearch;
+
+1;
+
+__END__
+
+__XS__
+
+MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParser
+
+SV*
+doc_set()
+CODE:
+ KOBJ_TO_SV_NOINC( kino_TestQP_doc_set(), RETVAL );
+OUTPUT: RETVAL
+
+MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParserSyntax
+
+void
+run_tests(invindex);
+ kino_InvIndex *invindex;
+PPCODE:
+ kino_TestQPSyntax_run_tests(invindex);
+
+MODULE = KinoSearch PACKAGE = KinoSearch::Test::TestQueryParserLogic
+
+void
+run_tests(invindex)
+ kino_InvIndex *invindex;
+PPCODE:
+ kino_TestQPLogic_run_tests(invindex);
+
+__COPYRIGHT__
+
+Copyright 2005-2008 Marvin Humphrey
+
+This program is free software; you can redistribute it and/or modify
+under the same terms as Perl itself.
+

Modified: trunk/perl/t/610-queryparser_logic.t
===================================================================
--- trunk/perl/t/610-queryparser_logic.t 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/t/610-queryparser_logic.t 2008-09-06 19:12:36 UTC (rev 3826)
@@ -4,11 +4,11 @@

package main;

-use KinoSearch::Test::TestQueryParser qw( doc_set );
-use KinoSearch::Test::TestQueryParserLogic;
+use KinoSearch::Test;
use KinoSearch::Test::TestUtils qw( create_invindex );

-my $invindex = create_invindex( @{ doc_set() } );
+my $doc_set = KinoSearch::Test::TestQueryParser::doc_set()->to_perl;
+my $invindex = create_invindex(@$doc_set);

KinoSearch::Test::TestQueryParserLogic::run_tests($invindex);


Modified: trunk/perl/t/611-queryparser_syntax.t
===================================================================
--- trunk/perl/t/611-queryparser_syntax.t 2008-09-06 18:56:04 UTC (rev 3825)
+++ trunk/perl/t/611-queryparser_syntax.t 2008-09-06 19:12:36 UTC (rev 3826)
@@ -29,11 +29,10 @@

package main;

-use KinoSearch;
-use KinoSearch::Test::TestQueryParser qw( doc_set );
+use KinoSearch::Test;

# Build invindex.
-my $docs = doc_set();
+my $doc_set = KinoSearch::Test::TestQueryParser::doc_set()->to_perl;
my $folder = KinoSearch::Store::RAMFolder->new;
my $schema = MySchema->new;
my $invindex = KinoSearch::InvIndex->clobber(
@@ -41,7 +40,7 @@
folder => $folder,
);
my $invindexer = KinoSearch::InvIndexer->new( invindex => $invindex );
-for my $content_string (@$docs) {
+for my $content_string (@$doc_set) {
$invindexer->add_doc(
{ plain => $content_string,
fancy => $content_string,


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits@rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch-commits