lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [16/20] git commit: refs/heads/cfish-string-prep1 - Eliminate SStr_Nibble in Clownfish::Test::TestObj
Date Sat, 07 Sep 2013 16:53:37 GMT
Eliminate SStr_Nibble in Clownfish::Test::TestObj


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

Branch: refs/heads/cfish-string-prep1
Commit: d7ed091804f0f5f657f04b56b3c7613625213a8f
Parents: ab80bcf
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Sep 7 18:04:59 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Sep 7 18:14:05 2013 +0200

----------------------------------------------------------------------
 clownfish/runtime/core/Clownfish/Test/TestObj.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/d7ed0918/clownfish/runtime/core/Clownfish/Test/TestObj.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/Test/TestObj.c b/clownfish/runtime/core/Clownfish/Test/TestObj.c
index cdc0961..7e06955 100644
--- a/clownfish/runtime/core/Clownfish/Test/TestObj.c
+++ b/clownfish/runtime/core/Clownfish/Test/TestObj.c
@@ -67,12 +67,7 @@ static void
 test_To_String(TestBatchRunner *runner) {
     Obj *testobj = S_new_testobj();
     String *string = Obj_To_String(testobj);
-    StackString *temp = SSTR_WRAP(string);
-    while (SStr_Get_Size(temp)) {
-        if (SStr_Starts_With_Str(temp, "TestObj", 7)) { break; }
-        SStr_Nibble(temp);
-    }
-    TEST_TRUE(runner, SStr_Starts_With_Str(temp, "TestObj", 7), "To_String");
+    TEST_TRUE(runner, Str_Find_Str(string, "TestObj", 7) >= 0, "To_String");
     DECREF(string);
     DECREF(testobj);
 }


Mime
View raw message