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 2013/05/30 22:36:36 UTC
[lucy-commits] [18/26] Move Lucy tests to a separate parcel TestLucy
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/core/Lucy/Test/Util/TestMemoryPool.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestMemoryPool.cfh b/core/Lucy/Test/Util/TestMemoryPool.cfh
index 7cd1b9f..a0762e3 100644
--- a/core/Lucy/Test/Util/TestMemoryPool.cfh
+++ b/core/Lucy/Test/Util/TestMemoryPool.cfh
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-parcel Lucy;
+parcel TestLucy;
class Lucy::Test::Util::TestMemoryPool cnick TestMemPool
inherits Clownfish::Test::TestBatch {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/core/Lucy/Test/Util/TestPriorityQueue.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestPriorityQueue.c b/core/Lucy/Test/Util/TestPriorityQueue.c
index a4a5a97..420f301 100644
--- a/core/Lucy/Test/Util/TestPriorityQueue.c
+++ b/core/Lucy/Test/Util/TestPriorityQueue.c
@@ -14,7 +14,8 @@
* limitations under the License.
*/
-#define C_LUCY_TESTPRIORITYQUEUE
+#define C_TESTLUCY_TESTPRIORITYQUEUE
+#define TESTLUCY_USE_SHORT_NAMES
#include "Lucy/Util/ToolSet.h"
#include "Clownfish/Test/TestFormatter.h"
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/core/Lucy/Test/Util/TestPriorityQueue.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestPriorityQueue.cfh b/core/Lucy/Test/Util/TestPriorityQueue.cfh
index 7fc7e56..19f56f5 100644
--- a/core/Lucy/Test/Util/TestPriorityQueue.cfh
+++ b/core/Lucy/Test/Util/TestPriorityQueue.cfh
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-parcel Lucy;
+parcel TestLucy;
class Lucy::Test::Util::NumPriorityQueue cnick NumPriQ
inherits Lucy::Util::PriorityQueue {
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/core/TestLucy.c
----------------------------------------------------------------------
diff --git a/core/TestLucy.c b/core/TestLucy.c
new file mode 100644
index 0000000..971dbae
--- /dev/null
+++ b/core/TestLucy.c
@@ -0,0 +1,20 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+void
+testlucy_init_parcel() {
+}
+
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/core/TestLucy.cfp
----------------------------------------------------------------------
diff --git a/core/TestLucy.cfp b/core/TestLucy.cfp
new file mode 100644
index 0000000..c1f2962
--- /dev/null
+++ b/core/TestLucy.cfp
@@ -0,0 +1,4 @@
+{
+ "name": "TestLucy",
+ "version": "v0.3.0"
+}
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index d46e618..8c7307a 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -68,7 +68,9 @@ my $builder = Lucy::Build->new(
$UTF8PROC_SRC_DIR,
],
},
- extra_compiler_flags => '-DCFP_CFISH -DCFP_TESTCFISH -DCFP_LUCY',
+ extra_compiler_flags => join( ' ', map { "-DCFP_$_" } qw(
+ CFISH TESTCFISH LUCY TESTLUCY
+ ) ),
add_to_cleanup => [
qw(
Lucy-*
http://git-wip-us.apache.org/repos/asf/lucy/blob/ffb0e921/perl/buildlib/Lucy/Build/Binding/Misc.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build/Binding/Misc.pm b/perl/buildlib/Lucy/Build/Binding/Misc.pm
index 55b372a..e55382d 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -117,7 +117,7 @@ CODE:
cfish_CharBuf *class_name = cfish_CB_newf("%s", package);
cfish_TestFormatter *formatter
= (cfish_TestFormatter*)cfish_TestFormatterTAP_new();
- bool result = lucy_Test_run_batch(class_name, formatter);
+ bool result = testlucy_Test_run_batch(class_name, formatter);
CFISH_DECREF(class_name);
CFISH_DECREF(formatter);
@@ -126,7 +126,7 @@ OUTPUT: RETVAL
END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
- parcel => "Lucy",
+ parcel => "TestLucy",
class_name => "Lucy::Test",
);
$binding->append_xs($xs_code);
@@ -136,7 +136,7 @@ END_XS_CODE
sub bind_testschema {
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
- parcel => "Lucy",
+ parcel => "TestLucy",
class_name => "Lucy::Test::TestSchema",
);
Clownfish::CFC::Binding::Perl::Class->register($binding);
@@ -153,10 +153,10 @@ MODULE = Lucy PACKAGE = Lucy::Test::Util::BBSortEx
SV*
fetch(self)
- lucy_BBSortEx *self;
+ testlucy_BBSortEx *self;
CODE:
{
- void *address = Lucy_BBSortEx_Fetch(self);
+ void *address = TestLucy_BBSortEx_Fetch(self);
if (address) {
RETVAL = XSBind_cfish_to_perl(*(cfish_Obj**)address);
CFISH_DECREF(*(cfish_Obj**)address);
@@ -169,10 +169,10 @@ OUTPUT: RETVAL
SV*
peek(self)
- lucy_BBSortEx *self;
+ testlucy_BBSortEx *self;
CODE:
{
- void *address = Lucy_BBSortEx_Peek(self);
+ void *address = TestLucy_BBSortEx_Peek(self);
if (address) {
RETVAL = XSBind_cfish_to_perl(*(cfish_Obj**)address);
}
@@ -184,16 +184,16 @@ OUTPUT: RETVAL
void
feed(self, bb)
- lucy_BBSortEx *self;
+ testlucy_BBSortEx *self;
cfish_ByteBuf *bb;
CODE:
CFISH_INCREF(bb);
- Lucy_BBSortEx_Feed(self, &bb);
+ TestLucy_BBSortEx_Feed(self, &bb);
END_XS_CODE
my $binding = Clownfish::CFC::Binding::Perl::Class->new(
- parcel => "Lucy",
+ parcel => "TestLucy",
class_name => "Lucy::Test::Util::BBSortEx",
);
$binding->exclude_method($_) for @hand_rolled;