subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r927792 - /subversion/trunk/subversion/tests/libsvn_wc/db-test.c
Date Fri, 26 Mar 2010 12:20:51 GMT
Author: rhuijben
Date: Fri Mar 26 12:20:50 2010
New Revision: 927792

URL: http://svn.apache.org/viewvc?rev=927792&view=rev
Log:
Following up on r927552, make the test wq items as a list with one atom.

* subversion/tests/libsvn_wc/db-test.c
  (detect_work_item): Handle updated wq item.
  (test_work_queue): Update test wq item to be a list with one atom.

Modified:
    subversion/trunk/subversion/tests/libsvn_wc/db-test.c

Modified: subversion/trunk/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/db-test.c?rev=927792&r1=927791&r2=927792&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Fri Mar 26 12:20:50 2010
@@ -1324,6 +1324,11 @@ test_upgrading_to_f15(apr_pool_t *pool)
 static int
 detect_work_item(const svn_skel_t *work_item)
 {
+  /* Test work items are a list with one integer atom as operation */
+  if (!work_item->children)
+    return -1;
+  work_item = work_item->children;
+
   if (!work_item->is_atom || work_item->len != 1)
     return -1;
   return work_item->data[0] - '0';
@@ -1343,13 +1348,16 @@ test_work_queue(apr_pool_t *pool)
                       svn_wc__db_openmode_readwrite, pool));
 
   /* Create three work items.  */
-  work_item = svn_skel__str_atom("0", pool);
+  work_item = svn_skel__make_empty_list(pool);
+  svn_skel__append(work_item, svn_skel__str_atom("0", pool));
   SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, pool));
 
-  work_item = svn_skel__str_atom("1", pool);
+  work_item = svn_skel__make_empty_list(pool);
+  svn_skel__append(work_item, svn_skel__str_atom("1", pool));
   SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, pool));
 
-  work_item = svn_skel__str_atom("2", pool);
+  work_item = svn_skel__make_empty_list(pool);
+  svn_skel__append(work_item, svn_skel__str_atom("2", pool));
   SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item, pool));
 
   while (TRUE)



Mime
View raw message