File: test_parameter.c

package info (click to toggle)
cowdancer 0.70
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 692 kB
  • sloc: ansic: 3,695; sh: 474; makefile: 191; cpp: 6
file content (60 lines) | stat: -rwxr-xr-x 833 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*BINFMTC: parameter.c

 */
#include <stdio.h>
#include <assert.h>
#include "parameter.h"

/* 
   Mock functions
 */
int cpbuilder_build(const struct pbuilderconfig* pc, const char* dscfile)
{
  return 0;
}

int cpbuilder_login(const struct pbuilderconfig* pc)
{
  return 0;
}

int cpbuilder_execute(const struct pbuilderconfig* pc, char** av)
{
  return 0;
}

int cpbuilder_update(const struct pbuilderconfig* pc)
{
  return 0;
}

int cpbuilder_help(void)
{
  return 0;
}

int cpbuilder_create(const struct pbuilderconfig* pc)
{
  return 0;
}
/* 
   end of mock functions
 */

/*
  Test size of Null Terminated String Array handling.
 */
void test_size_of_ntarray()
{
  char* test[32];
  test[0]="test1";
  test[1]="test2";
  test[2]=NULL;
  assert(size_of_ntarray(test)==2);
}

int main()
{
  test_size_of_ntarray();
  return 0;
}