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:24 UTC
[lucy-commits] [06/26] Move Clownfish runtime tests to a separate parcel
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/core/Lucy/Test/Util/TestStringHelper.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestStringHelper.c b/core/Lucy/Test/Util/TestStringHelper.c
deleted file mode 100644
index 04a5ba9..0000000
--- a/core/Lucy/Test/Util/TestStringHelper.c
+++ /dev/null
@@ -1,354 +0,0 @@
-/* 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.
- */
-
-#include "Lucy/Util/ToolSet.h"
-
-#include "Clownfish/Test/TestFormatter.h"
-#include "Lucy/Test.h"
-#include "Lucy/Test/Util/TestStringHelper.h"
-#include "Lucy/Test/TestUtils.h"
-#include "Clownfish/Util/StringHelper.h"
-#include "utf8proc.h"
-#include "Lucy/Util/Json.h"
-
-/* This alternative implementation of utf8_valid() is (presumably) slower, but
- * it implements the standard in a more linear, easy-to-grok way.
- */
-#define TRAIL_OK(n) (n >= 0x80 && n <= 0xBF)
-TestStringHelper*
-TestStrHelp_new(TestFormatter *formatter) {
- TestStringHelper *self = (TestStringHelper*)VTable_Make_Obj(TESTSTRINGHELPER);
- return TestStrHelp_init(self, formatter);
-}
-
-TestStringHelper*
-TestStrHelp_init(TestStringHelper *self, TestFormatter *formatter) {
- return (TestStringHelper*)TestBatch_init((TestBatch*)self, 41, formatter);
-}
-
-static bool
-S_utf8_valid_alt(const char *maybe_utf8, size_t size) {
- const uint8_t *string = (const uint8_t*)maybe_utf8;
- const uint8_t *const end = string + size;
- while (string < end) {
- int count = StrHelp_UTF8_COUNT[*string];
- bool valid = false;
- if (count == 1) {
- if (string[0] <= 0x7F) {
- valid = true;
- }
- }
- else if (count == 2) {
- if (string[0] >= 0xC2 && string[0] <= 0xDF) {
- if (TRAIL_OK(string[1])) {
- valid = true;
- }
- }
- }
- else if (count == 3) {
- if (string[0] == 0xE0) {
- if (string[1] >= 0xA0 && string[1] <= 0xBF
- && TRAIL_OK(string[2])
- ) {
- valid = true;
- }
- }
- else if (string[0] >= 0xE1 && string[0] <= 0xEC) {
- if (TRAIL_OK(string[1])
- && TRAIL_OK(string[2])
- ) {
- valid = true;
- }
- }
- else if (string[0] == 0xED) {
- if (string[1] >= 0x80 && string[1] <= 0x9F
- && TRAIL_OK(string[2])
- ) {
- valid = true;
- }
- }
- else if (string[0] >= 0xEE && string[0] <= 0xEF) {
- if (TRAIL_OK(string[1])
- && TRAIL_OK(string[2])
- ) {
- valid = true;
- }
- }
- }
- else if (count == 4) {
- if (string[0] == 0xF0) {
- if (string[1] >= 0x90 && string[1] <= 0xBF
- && TRAIL_OK(string[2])
- && TRAIL_OK(string[3])
- ) {
- valid = true;
- }
- }
- else if (string[0] >= 0xF1 && string[0] <= 0xF3) {
- if (TRAIL_OK(string[1])
- && TRAIL_OK(string[2])
- && TRAIL_OK(string[3])
- ) {
- valid = true;
- }
- }
- else if (string[0] == 0xF4) {
- if (string[1] >= 0x80 && string[1] <= 0x8F
- && TRAIL_OK(string[2])
- && TRAIL_OK(string[3])
- ) {
- valid = true;
- }
- }
- }
-
- if (!valid) {
- return false;
- }
- string += count;
- }
-
- if (string != end) {
- return false;
- }
-
- return true;
-}
-
-static void
-test_overlap(TestBatch *batch) {
- int32_t result;
- result = StrHelp_overlap("", "", 0, 0);
- TEST_INT_EQ(batch, result, 0, "two empty strings");
- result = StrHelp_overlap("", "foo", 0, 3);
- TEST_INT_EQ(batch, result, 0, "first string is empty");
- result = StrHelp_overlap("foo", "", 3, 0);
- TEST_INT_EQ(batch, result, 0, "second string is empty");
- result = StrHelp_overlap("foo", "foo", 3, 3);
- TEST_INT_EQ(batch, result, 3, "equal strings");
- result = StrHelp_overlap("foo bar", "foo", 7, 3);
- TEST_INT_EQ(batch, result, 3, "first string is longer");
- result = StrHelp_overlap("foo", "foo bar", 3, 7);
- TEST_INT_EQ(batch, result, 3, "second string is longer");
-}
-
-
-static void
-test_to_base36(TestBatch *batch) {
- char buffer[StrHelp_MAX_BASE36_BYTES];
- StrHelp_to_base36(UINT64_MAX, buffer);
- TEST_STR_EQ(batch, "3w5e11264sgsf", buffer, "base36 UINT64_MAX");
- StrHelp_to_base36(1, buffer);
- TEST_STR_EQ(batch, "1", buffer, "base36 1");
- TEST_INT_EQ(batch, buffer[1], 0, "base36 NULL termination");
-}
-
-static void
-test_utf8_round_trip(TestBatch *batch) {
- uint32_t code_point;
- for (code_point = 0; code_point <= 0x10FFFF; code_point++) {
- char buffer[4];
- uint32_t size = StrHelp_encode_utf8_char(code_point, buffer);
- char *start = buffer;
- char *end = start + size;
-
- // Verify length returned by encode_utf8_char().
- if (size != StrHelp_UTF8_COUNT[(unsigned char)buffer[0]]) {
- break;
- }
- // Verify that utf8_valid() agrees with alternate implementation.
- if (!!StrHelp_utf8_valid(start, size)
- != !!S_utf8_valid_alt(start, size)
- ) {
- break;
- }
-
- // Verify back_utf8_char().
- if (StrHelp_back_utf8_char(end, start) != start) {
- break;
- }
-
- // Verify round trip of encode/decode.
- if (StrHelp_decode_utf8_char(buffer) != code_point) {
- break;
- }
- }
- if (code_point == 0x110000) {
- PASS(batch, "Successfully round tripped 0 - 0x10FFFF");
- }
- else {
- FAIL(batch, "Failed round trip at 0x%.1X", (unsigned)code_point);
- }
-}
-
-static void
-S_test_validity(TestBatch *batch, const char *content, size_t size,
- bool expected, const char *description) {
- bool sane = StrHelp_utf8_valid(content, size);
- bool double_check = S_utf8_valid_alt(content, size);
- if (sane != double_check) {
- FAIL(batch, "Disagreement: %s", description);
- }
- else {
- TEST_TRUE(batch, sane == expected, "%s", description);
- }
-}
-
-static void
-test_utf8_valid(TestBatch *batch) {
- // Musical symbol G clef:
- // Code point: U+1D11E
- // UTF-16: 0xD834 0xDD1E
- // UTF-8 0xF0 0x9D 0x84 0x9E
- S_test_validity(batch, "\xF0\x9D\x84\x9E", 4, true,
- "Musical symbol G clef");
- S_test_validity(batch, "\xED\xA0\xB4\xED\xB4\x9E", 6, false,
- "G clef as UTF-8 encoded UTF-16 surrogates");
- S_test_validity(batch, ".\xED\xA0\xB4.", 5, false,
- "Isolated high surrogate");
- S_test_validity(batch, ".\xED\xB4\x9E.", 5, false,
- "Isolated low surrogate");
-
- // Shortest form.
- S_test_validity(batch, ".\xC1\x9C.", 4, false,
- "Non-shortest form ASCII backslash");
- S_test_validity(batch, ".\xC0\xAF.", 4, false,
- "Non-shortest form ASCII slash");
- S_test_validity(batch, ".\xC0\x80.", 4, false,
- "Non-shortest form ASCII NUL character");
-
- // Range.
- S_test_validity(batch, "\xF8\x88\x80\x80\x80", 5, false, "5-byte UTF-8");
-
- // Bad continuations.
- S_test_validity(batch, "\xE2\x98\xBA\xE2\x98\xBA", 6, true,
- "SmileySmiley");
- S_test_validity(batch, "\xE2\xBA\xE2\x98\xBA", 5, false,
- "missing first continuation byte");
- S_test_validity(batch, "\xE2\x98\xE2\x98\xBA", 5, false,
- "missing second continuation byte");
- S_test_validity(batch, "\xE2\xE2\x98\xBA", 4, false,
- "missing both continuation bytes");
- S_test_validity(batch, "\xBA\xE2\x98\xBA\xE2\xBA", 5, false,
- "missing first continuation byte (end)");
- S_test_validity(batch, "\xE2\x98\xBA\xE2\x98", 5, false,
- "missing second continuation byte (end)");
- S_test_validity(batch, "\xE2\x98\xBA\xE2", 4, false,
- "missing both continuation bytes (end)");
- S_test_validity(batch, "\xBA\xE2\x98\xBA", 4, false,
- "isolated continuation byte 0xBA");
- S_test_validity(batch, "\x98\xE2\x98\xBA", 4, false,
- "isolated continuation byte 0x98");
- S_test_validity(batch, "\xE2\x98\xBA\xBA", 4, false,
- "isolated continuation byte 0xBA (end)");
- S_test_validity(batch, "\xE2\x98\xBA\x98", 4, false,
- "isolated continuation byte 0x98 (end)");
-}
-
-static void
-test_is_whitespace(TestBatch *batch) {
- TEST_TRUE(batch, StrHelp_is_whitespace(' '), "space is whitespace");
- TEST_TRUE(batch, StrHelp_is_whitespace('\n'), "newline is whitespace");
- TEST_TRUE(batch, StrHelp_is_whitespace('\t'), "tab is whitespace");
- TEST_TRUE(batch, StrHelp_is_whitespace('\v'),
- "vertical tab is whitespace");
- TEST_TRUE(batch, StrHelp_is_whitespace(0x180E),
- "Mongolian vowel separator is whitespace");
- TEST_FALSE(batch, StrHelp_is_whitespace('a'), "'a' isn't whitespace");
- TEST_FALSE(batch, StrHelp_is_whitespace(0), "NULL isn't whitespace");
- TEST_FALSE(batch, StrHelp_is_whitespace(0x263A),
- "Smiley isn't whitespace");
-}
-
-static void
-test_back_utf8_char(TestBatch *batch) {
- char buffer[4];
- char *buf = buffer + 1;
- uint32_t len = StrHelp_encode_utf8_char(0x263A, buffer);
- char *end = buffer + len;
- TEST_TRUE(batch, StrHelp_back_utf8_char(end, buffer) == buffer,
- "back_utf8_char");
- TEST_TRUE(batch, StrHelp_back_utf8_char(end, buf) == NULL,
- "back_utf8_char returns NULL rather than back up beyond start");
- TEST_TRUE(batch, StrHelp_back_utf8_char(buffer, buffer) == NULL,
- "back_utf8_char returns NULL when end == start");
-}
-
-static void
-test_utf8proc_normalization(TestBatch *batch) {
- SKIP(batch, "utf8proc can't handle control chars or Unicode non-chars");
- return;
-
- for (int32_t i = 0; i < 100; i++) {
- CharBuf *source = TestUtils_random_string(rand() % 40);
-
- // Normalize once.
- uint8_t *normalized;
- int32_t check = utf8proc_map(CB_Get_Ptr8(source), CB_Get_Size(source),
- &normalized,
- UTF8PROC_STABLE |
- UTF8PROC_COMPOSE |
- UTF8PROC_COMPAT |
- UTF8PROC_CASEFOLD);
- if (check < 0) {
- lucy_Json_set_tolerant(1);
- CharBuf *json = lucy_Json_to_json((Obj*)source);
- if (!json) {
- json = CB_newf("[failed to encode]");
- }
- FAIL(batch, "Failed to normalize: %s", CB_Get_Ptr8(json));
- DECREF(json);
- DECREF(source);
- return;
- }
-
- // Normalize again.
- size_t normalized_len = strlen((char*)normalized);
- uint8_t *dupe;
- int32_t dupe_check = utf8proc_map(normalized, normalized_len, &dupe,
- UTF8PROC_STABLE |
- UTF8PROC_COMPOSE |
- UTF8PROC_COMPAT |
- UTF8PROC_CASEFOLD);
- if (dupe_check < 0) {
- THROW(ERR, "Unexpected normalization error: %i32", dupe_check);
- }
- int comparison = strcmp((char*)normalized, (char*)dupe);
- free(dupe);
- free(normalized);
- DECREF(source);
- if (comparison != 0) {
- FAIL(batch, "Not fully normalized");
- return;
- }
- }
- PASS(batch, "Normalization successful.");
-}
-
-void
-TestStrHelp_run_tests(TestStringHelper *self) {
- TestBatch *batch = (TestBatch*)self;
- test_overlap(batch);
- test_to_base36(batch);
- test_utf8_round_trip(batch);
- test_utf8_valid(batch);
- test_is_whitespace(batch);
- test_back_utf8_char(batch);
- test_utf8proc_normalization(batch);
-}
-
-
-
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/core/Lucy/Test/Util/TestStringHelper.cfh
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestStringHelper.cfh b/core/Lucy/Test/Util/TestStringHelper.cfh
deleted file mode 100644
index d36008c..0000000
--- a/core/Lucy/Test/Util/TestStringHelper.cfh
+++ /dev/null
@@ -1,32 +0,0 @@
-/* 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.
- */
-
-parcel Lucy;
-
-class Lucy::Test::Util::TestStringHelper cnick TestStrHelp
- inherits Clownfish::Test::TestBatch {
-
- inert incremented TestStringHelper*
- new(TestFormatter *formatter);
-
- inert TestStringHelper*
- init(TestStringHelper *self, TestFormatter *formatter);
-
- void
- Run_Tests(TestStringHelper *self);
-}
-
-
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/core/TestClownfish.c
----------------------------------------------------------------------
diff --git a/core/TestClownfish.c b/core/TestClownfish.c
new file mode 100644
index 0000000..a946163
--- /dev/null
+++ b/core/TestClownfish.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
+testcfish_init_parcel() {
+}
+
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/core/TestClownfish.cfp
----------------------------------------------------------------------
diff --git a/core/TestClownfish.cfp b/core/TestClownfish.cfp
new file mode 100644
index 0000000..f1c9411
--- /dev/null
+++ b/core/TestClownfish.cfp
@@ -0,0 +1,5 @@
+{
+ "name": "TestClownfish",
+ "nickname": "TestCfish",
+ "version": "v0.3.0"
+}
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/Build.PL
----------------------------------------------------------------------
diff --git a/perl/Build.PL b/perl/Build.PL
index ce003dc..d46e618 100644
--- a/perl/Build.PL
+++ b/perl/Build.PL
@@ -68,7 +68,7 @@ my $builder = Lucy::Build->new(
$UTF8PROC_SRC_DIR,
],
},
- extra_compiler_flags => '-DCFP_CFISH -DCFP_LUCY',
+ extra_compiler_flags => '-DCFP_CFISH -DCFP_TESTCFISH -DCFP_LUCY',
add_to_cleanup => [
qw(
Lucy-*
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/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 c1377e0..55b372a 100644
--- a/perl/buildlib/Lucy/Build/Binding/Misc.pm
+++ b/perl/buildlib/Lucy/Build/Binding/Misc.pm
@@ -22,7 +22,8 @@ $VERSION = eval $VERSION;
sub bind_all {
my $class = shift;
$class->bind_lucy;
- $class->bind_test;
+ $class->bind_cfish_test;
+ $class->bind_lucy_test;
$class->bind_testschema;
$class->bind_bbsortex;
}
@@ -77,7 +78,35 @@ END_XS_CODE
Clownfish::CFC::Binding::Perl::Class->register($binding);
}
-sub bind_test {
+sub bind_cfish_test {
+ my $xs_code = <<'END_XS_CODE';
+MODULE = Lucy PACKAGE = Clownfish::Test
+
+bool
+run_tests(package)
+ char *package;
+CODE:
+ cfish_CharBuf *class_name = cfish_CB_newf("%s", package);
+ cfish_TestFormatter *formatter
+ = (cfish_TestFormatter*)cfish_TestFormatterTAP_new();
+ bool result = testcfish_Test_run_batch(class_name, formatter);
+ CFISH_DECREF(class_name);
+ CFISH_DECREF(formatter);
+
+ RETVAL = result;
+OUTPUT: RETVAL
+END_XS_CODE
+
+ my $binding = Clownfish::CFC::Binding::Perl::Class->new(
+ parcel => "TestClownfish",
+ class_name => "Clownfish::Test",
+ );
+ $binding->append_xs($xs_code);
+
+ Clownfish::CFC::Binding::Perl::Class->register($binding);
+}
+
+sub bind_lucy_test {
my $xs_code = <<'END_XS_CODE';
MODULE = Lucy PACKAGE = Lucy::Test
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/lib/Clownfish/Test.pm
----------------------------------------------------------------------
diff --git a/perl/lib/Clownfish/Test.pm b/perl/lib/Clownfish/Test.pm
new file mode 100644
index 0000000..1bd3c79
--- /dev/null
+++ b/perl/lib/Clownfish/Test.pm
@@ -0,0 +1,25 @@
+# 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.
+
+package Clownfish::Test;
+use Lucy;
+our $VERSION = '0.003000';
+$VERSION = eval $VERSION;
+
+1;
+
+__END__
+
+
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/016-varray.t
----------------------------------------------------------------------
diff --git a/perl/t/core/016-varray.t b/perl/t/core/016-varray.t
index 6e214c2..5ddb5c1 100644
--- a/perl/t/core/016-varray.t
+++ b/perl/t/core/016-varray.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestVArray");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestVArray");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/017-hash.t
----------------------------------------------------------------------
diff --git a/perl/t/core/017-hash.t b/perl/t/core/017-hash.t
index 36c61ec..f8583c8 100644
--- a/perl/t/core/017-hash.t
+++ b/perl/t/core/017-hash.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestHash");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestHash");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/019-obj.t
----------------------------------------------------------------------
diff --git a/perl/t/core/019-obj.t b/perl/t/core/019-obj.t
index 470c8c7..ea51ecf 100644
--- a/perl/t/core/019-obj.t
+++ b/perl/t/core/019-obj.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestObj");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestObj");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/020-err.t
----------------------------------------------------------------------
diff --git a/perl/t/core/020-err.t b/perl/t/core/020-err.t
index 2a9ccf1..0679130 100644
--- a/perl/t/core/020-err.t
+++ b/perl/t/core/020-err.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestErr");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestErr");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/022-bytebuf.t
----------------------------------------------------------------------
diff --git a/perl/t/core/022-bytebuf.t b/perl/t/core/022-bytebuf.t
index a6de264..5dd7437 100644
--- a/perl/t/core/022-bytebuf.t
+++ b/perl/t/core/022-bytebuf.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestByteBuf");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestByteBuf");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/029-charbuf.t
----------------------------------------------------------------------
diff --git a/perl/t/core/029-charbuf.t b/perl/t/core/029-charbuf.t
index 33c28a5..39041fb 100644
--- a/perl/t/core/029-charbuf.t
+++ b/perl/t/core/029-charbuf.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestCharBuf");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestCharBuf");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/030-number_utils.t
----------------------------------------------------------------------
diff --git a/perl/t/core/030-number_utils.t b/perl/t/core/030-number_utils.t
index 672f3cd..1035f96 100644
--- a/perl/t/core/030-number_utils.t
+++ b/perl/t/core/030-number_utils.t
@@ -16,8 +16,10 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Util::TestNumberUtils");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests(
+ "Clownfish::Test::Util::TestNumberUtils"
+);
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/031-num.t
----------------------------------------------------------------------
diff --git a/perl/t/core/031-num.t b/perl/t/core/031-num.t
index e1d00fa..e784ae6 100644
--- a/perl/t/core/031-num.t
+++ b/perl/t/core/031-num.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestNum");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::TestNum");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/032-string_helper.t
----------------------------------------------------------------------
diff --git a/perl/t/core/032-string_helper.t b/perl/t/core/032-string_helper.t
index d5e80d1..ffa4fbe 100644
--- a/perl/t/core/032-string_helper.t
+++ b/perl/t/core/032-string_helper.t
@@ -16,8 +16,10 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Util::TestStringHelper");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests(
+ "Clownfish::Test::Util::TestStringHelper"
+);
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/037-atomic.t
----------------------------------------------------------------------
diff --git a/perl/t/core/037-atomic.t b/perl/t/core/037-atomic.t
index c21c0dd..1ed26e9 100644
--- a/perl/t/core/037-atomic.t
+++ b/perl/t/core/037-atomic.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Util::TestAtomic");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::Util::TestAtomic");
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/038-lock_free_registry.t
----------------------------------------------------------------------
diff --git a/perl/t/core/038-lock_free_registry.t b/perl/t/core/038-lock_free_registry.t
index d9940b5..f6484c6 100644
--- a/perl/t/core/038-lock_free_registry.t
+++ b/perl/t/core/038-lock_free_registry.t
@@ -16,8 +16,10 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Object::TestLockFreeRegistry");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests(
+ "Clownfish::Test::TestLockFreeRegistry"
+);
exit($success ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/lucy/blob/9f826b31/perl/t/core/039-memory.t
----------------------------------------------------------------------
diff --git a/perl/t/core/039-memory.t b/perl/t/core/039-memory.t
index 8bf2565..16c1c68 100644
--- a/perl/t/core/039-memory.t
+++ b/perl/t/core/039-memory.t
@@ -16,8 +16,8 @@
use strict;
use warnings;
-use Lucy::Test;
-my $success = Lucy::Test::run_tests("Lucy::Test::Util::TestMemory");
+use Clownfish::Test;
+my $success = Clownfish::Test::run_tests("Clownfish::Test::Util::TestMemory");
exit($success ? 0 : 1);