~ubuntu-branches/ubuntu/trusty/subversion/trusty-proposed

« back to all changes in this revision

Viewing changes to subversion/tests/libsvn_subr/checksum-test.c

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft
  • Date: 2012-06-21 15:36:36 UTC
  • mfrom: (0.4.13 sid)
  • Revision ID: package-import@ubuntu.com-20120621153636-amqqmuidgwgxz1ly
Tags: 1.7.5-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - Create pot file on build.
  - Build a python-subversion-dbg package.
  - Build-depend on python-dbg.
  - Build-depend on default-jre-headless/-jdk.
  - Do not apply java-build patch.
  - debian/rules: Manually create the doxygen output directory, otherwise
    we get weird build failures when running parallel builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * checksum-test.c:  tests checksum functions.
3
3
 *
4
4
 * ====================================================================
5
 
 * Copyright (c) 2008 CollabNet.  All rights reserved.
6
 
 *
7
 
 * This software is licensed as described in the file COPYING, which
8
 
 * you should have received as part of this distribution.  The terms
9
 
 * are also available at http://subversion.tigris.org/license-1.html.
10
 
 * If newer versions of this license are posted there, you may use a
11
 
 * newer version instead, at your option.
12
 
 *
13
 
 * This software consists of voluntary contributions made by many
14
 
 * individuals.  For exact contribution history, see the revision
15
 
 * history and logs, available at http://subversion.tigris.org/.
 
5
 *    Licensed to the Apache Software Foundation (ASF) under one
 
6
 *    or more contributor license agreements.  See the NOTICE file
 
7
 *    distributed with this work for additional information
 
8
 *    regarding copyright ownership.  The ASF licenses this file
 
9
 *    to you under the Apache License, Version 2.0 (the
 
10
 *    "License"); you may not use this file except in compliance
 
11
 *    with the License.  You may obtain a copy of the License at
 
12
 *
 
13
 *      http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 *    Unless required by applicable law or agreed to in writing,
 
16
 *    software distributed under the License is distributed on an
 
17
 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 
18
 *    KIND, either express or implied.  See the License for the
 
19
 *    specific language governing permissions and limitations
 
20
 *    under the License.
16
21
 * ====================================================================
17
22
 */
18
23
 
19
24
#include <apr_pools.h>
20
25
 
21
26
#include "svn_error.h"
22
 
#include "svn_version.h"
23
27
 
24
28
#include "../svn_test.h"
25
29
 
26
30
static svn_error_t *
27
 
test_checksum_parse(const char **msg,
28
 
                    svn_boolean_t msg_only,
29
 
                    svn_test_opts_t *opts,
30
 
                    apr_pool_t *pool)
 
31
test_checksum_parse(apr_pool_t *pool)
31
32
{
32
33
  const char *md5_digest = "8518b76f7a45fe4de2d0955085b41f98";
33
34
  const char *sha1_digest = "74d82379bcc6771454377db03b912c2b62704139";
34
35
  const char *checksum_display;
35
36
  svn_checksum_t *checksum;
36
37
 
37
 
  *msg = "checksum parse";
38
 
  if (msg_only)
39
 
    return SVN_NO_ERROR;
40
 
 
41
38
  SVN_ERR(svn_checksum_parse_hex(&checksum, svn_checksum_md5, md5_digest, pool));
42
39
  checksum_display = svn_checksum_to_cstring_display(checksum, pool);
43
40
 
66
63
struct svn_test_descriptor_t test_funcs[] =
67
64
  {
68
65
    SVN_TEST_NULL,
69
 
    SVN_TEST_PASS(test_checksum_parse),
 
66
    SVN_TEST_PASS2(test_checksum_parse,
 
67
                   "checksum parse"),
70
68
    SVN_TEST_NULL
71
69
  };