Checkout
Bert Huijben
committed
on 19 Feb 15
Convert db-tests.c's initial state generation to a similar C struct as used
in op-depth-tests.c, to allow handling future database format up… Show more
Convert db-tests.c's initial state generation to a similar C struct as used

in op-depth-tests.c, to allow handling future database format updates

without rewriting all sql manually.

* subversion/libsvn_wc/wc-checks.sql

 (STMT_STATIC_VERIFY): Extend further. This time to fix some NULL cases

   caused by joining.

* subversion/tests/libsvn_wc/db-test.c

 (TESTING_DATA): Remove NODES and ACTUAL init.

 (NOT_MOVED,

  NO_COPY_FROM): New defines.

 (nodes_init_data,

  actual_init_data): New variables, manually extracted from TESTING_DATA.

 (create_open): Update caller.

* subversion/tests/libsvn_wc/entries-compat.c

 (create_fake_wc): Update caller.

* subversion/tests/libsvn_wc/utils.c

 (includes): Add token-map.h.

 (svn_test__create_fake_wc): Use db queries to fill wc.db if data

   provided.

* subversion/tests/libsvn_wc/utils.h

 (svn_test__nodes_data_t,

  svn_test__actual_data_t): New types.

 (svn_test__create_fake_wc): Add arguments to pass initial nodes and

   actual rows.

Show less