[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1027896 - /subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Wed, 27 Oct 2010 10:51:36 -0500

On Wed, Oct 27, 2010 at 5:30 AM, <philip_at_apache.org> wrote:
> Author: philip
> Date: Wed Oct 27 10:30:38 2010
> New Revision: 1027896
>
> URL: http://svn.apache.org/viewvc?rev=1027896&view=rev
> Log:
> * subversion/tests/libsvn_wc/op-depth-test.c
>  (wc_wc_copies): Use "const char []" for constants rather than #define.
>
> Modified:
>    subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
>
> Modified: subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c?rev=1027896&r1=1027895&r2=1027896&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c (original)
> +++ subversion/trunk/subversion/tests/libsvn_wc/op-depth-test.c Wed Oct 27 10:30:38 2010
> @@ -411,19 +411,19 @@ check_db_rows(wc_baton_t *b,
>  static svn_error_t *
>  wc_wc_copies(wc_baton_t *b)
>  {
> -  SVN_ERR(add_and_commit_greek_tree(b));
> +  const char source_everything[]  = "A/B";
>
> -#define source_everything  "A/B"
> +  const char source_base_file[]   = "A/B/lambda";
> +  const char source_base_dir[]    = "A/B/E";
>
> -#define source_base_file   "A/B/lambda"
> -#define source_base_dir    "A/B/E"
> +  const char source_added_file[]  = "A/B/file-added";
> +  const char source_added_dir[]   = "A/B/D-added";
> +  const char source_added_dir2[]  = "A/B/D-added/D2";
>
> -#define source_added_file  "A/B/file-added"
> -#define source_added_dir   "A/B/D-added"
> -#define source_added_dir2  "A/B/D-added/D2"
> +  const char source_copied_file[] = "A/B/lambda-copied";
> +  const char source_copied_dir[]  = "A/B/E-copied";
>
> -#define source_copied_file "A/B/lambda-copied"
> -#define source_copied_dir  "A/B/E-copied"
> +  SVN_ERR(add_and_commit_greek_tree(b));
>
>   /* Create the various kinds of source node which will be copied */

Nice change, but minor style nit: I think we use 'const char *' for
these types of expressions, instead of the array syntax. (Or at
least, I prefer the former :)

-Hyrum
Received on 2010-10-27 18:41:16 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.