lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [07/15] git commit: refs/heads/cfish-string-prep1 - Eliminate Str_Cat_Char in Lucy::Test
Date Mon, 02 Sep 2013 19:16:38 GMT
Eliminate Str_Cat_Char in Lucy::Test


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/a94a2c12
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/a94a2c12
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/a94a2c12

Branch: refs/heads/cfish-string-prep1
Commit: a94a2c12658c795ffb9caccd90f609b813bc669f
Parents: ee8b20d
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Mon Sep 2 20:20:04 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Sep 2 21:12:30 2013 +0200

----------------------------------------------------------------------
 core/Lucy/Test/Plan/TestFieldMisc.c | 3 +--
 core/Lucy/Test/Util/TestJson.c      | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/a94a2c12/core/Lucy/Test/Plan/TestFieldMisc.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Plan/TestFieldMisc.c b/core/Lucy/Test/Plan/TestFieldMisc.c
index 028ac35..1717c78 100644
--- a/core/Lucy/Test/Plan/TestFieldMisc.c
+++ b/core/Lucy/Test/Plan/TestFieldMisc.c
@@ -202,8 +202,7 @@ test_many_fields(TestBatchRunner *runner) {
         String *content;
 
         for (int c = 'a'; c <= 'z'; ++c) {
-            content = Str_new(1);
-            Str_Cat_Char(content, c);
+            content = Str_new_from_char(c);
             S_add_many_fields_doc(indexer, content, num_fields);
             DECREF(content);
         }

http://git-wip-us.apache.org/repos/asf/lucy/blob/a94a2c12/core/Lucy/Test/Util/TestJson.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Util/TestJson.c b/core/Lucy/Test/Util/TestJson.c
index b8efba7..3872a1d 100644
--- a/core/Lucy/Test/Util/TestJson.c
+++ b/core/Lucy/Test/Util/TestJson.c
@@ -115,8 +115,7 @@ static const char* quote_escapes_json[] = {
 static void
 test_escapes(TestBatchRunner *runner) {
     for (int i = 0; control_escapes[i] != NULL; i++) {
-        String *string = Str_new(1);
-        Str_Cat_Char(string, i);
+        String     *string  = Str_new_from_char(i);
         const char *escaped = control_escapes[i];
         String     *json    = Json_to_json((Obj*)string);
         String     *decoded = (String*)Json_from_json(json);


Mime
View raw message