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/09/02 21:16:38 UTC
[lucy-commits] [07/15] git commit: refs/heads/cfish-string-prep1 - Eliminate
Str_Cat_Char in Lucy::Test
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 <we...@aevum.de>
Authored: Mon Sep 2 20:20:04 2013 +0200
Committer: Nick Wellnhofer <we...@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);