lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r925453 - /lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c
Date Fri, 19 Mar 2010 21:57:21 GMT
Author: marvin
Date: Fri Mar 19 21:57:21 2010
New Revision: 925453

URL: http://svn.apache.org/viewvc?rev=925453&view=rev
Log:
Add a test for VCatF() with an "%o" and a non-CharBuf object.

Modified:
    lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c

Modified: lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c?rev=925453&r1=925452&r2=925453&view=diff
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c (original)
+++ lucene/lucy/trunk/core/Lucy/Test/Object/TestCharBuf.c Fri Mar 19 21:57:21 2010
@@ -235,6 +235,19 @@ test_vcatf_cb(TestBatch *batch)
 }
 
 static void
+test_vcatf_obj(TestBatch *batch)
+{
+    CharBuf   *wanted = S_get_cb("ooga 20 booga");
+    Integer32 *i32 = Int32_new(20);
+    CharBuf   *got = S_get_cb("ooga");
+    CB_catf(got, " %o booga", i32);
+    ASSERT_TRUE(batch, CB_Equals(wanted, (Obj*)got), "%%o Obj");
+    DECREF(i32);
+    DECREF(wanted);
+    DECREF(got);
+}
+
+static void
 test_vcatf_null_obj(TestBatch *batch)
 {
     CharBuf *wanted = S_get_cb("foo bar [NULL] baz");
@@ -365,12 +378,13 @@ test_serialization(TestBatch *batch)
 void
 TestCB_run_tests()
 {
-    TestBatch *batch = TestBatch_new(48);
+    TestBatch *batch = TestBatch_new(49);
     TestBatch_Plan(batch);
 
     test_vcatf_s(batch);
     test_vcatf_null_string(batch);
     test_vcatf_cb(batch);
+    test_vcatf_obj(batch);
     test_vcatf_null_obj(batch);
     test_vcatf_i8(batch);
     test_vcatf_i32(batch);



Mime
View raw message