~drizzle-trunk/libdrizzle/jenkins-Libdrizzle-21

« back to all changes in this revision

Viewing changes to tests/unit/hex.c

  • Committer: Continuous Integration
  • Date: 2012-12-27 22:20:37 UTC
  • mfrom: (62.2.4 5.1-tests)
  • Revision ID: ci@drizzle.org-20121227222037-7ppxx42d00f6h58j
Merge lp:~linuxjedi/libdrizzle/5.1-tests Build: jenkins-Libdrizzle-10

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 *
36
36
 */
37
37
 
38
 
#include "config.h"
39
 
 
40
38
#include <libdrizzle-5.1/libdrizzle.h>
41
39
#include <stdio.h>
 
40
#include <string.h>
42
41
#include <stdlib.h>
 
42
#include <stdint.h>
43
43
 
44
44
int main(int argc, char* argv[])
45
45
{
53
53
  // Test for bad usage
54
54
  result= drizzle_hex_string(out, in, 0);
55
55
  if (result)
 
56
  {
 
57
    printf("Bad usage failure\n");
56
58
    return EXIT_FAILURE;
 
59
  }
57
60
 
58
61
  result= drizzle_hex_string(out, in, 6);
59
62
  if (!result)
 
63
  {
 
64
    printf("Failed to get result\n");
60
65
    return EXIT_FAILURE;
 
66
  }
61
67
 
62
 
  printf("%s\n", out);
 
68
  if (strcmp(out, "00FF7F80B9C0") != 0)
 
69
  {
 
70
    printf("Bad result data\n");
 
71
    return EXIT_FAILURE;
 
72
  }
63
73
  return EXIT_SUCCESS;
64
74
}