summaryrefslogtreecommitdiff
path: root/Tests/LoadCommand/LoadedCommand.cxx.in
blob: c58bcf15315fb5fabcca5d67f93631ff6f6afc87 (plain)
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
#include "LoadedCommand.h"
#include <stdio.h>

int testSizeOf(int s1, int s2)
{
  return s1 - s2;
}

int main ()
{
  int ret = 0;
#ifdef HAVE_VSBLABLA
  printf("Should not be able to find vsblabla\n");
  ret = 1;
#endif

#if !defined( HAVE_PRINTF )
  printf("Should be able to find printf\n");
  ret= 1;
#endif

#if !defined( ADDED_DEFINITION )
  printf("Should have ADDED_DEFINITION defined\n");
  ret= 1;
#endif
#if !defined(CMAKE_IS_FUN)
  printf("Loaded Command was not built with CMAKE_IS_FUN: failed.\n");
  ret = 1;
#endif
  if(testSizeOf(SIZEOF_CHAR, sizeof(char)))
    {
    printf("Size of char is broken.\n");
    ret = 1;
    }
  if(testSizeOf(SIZEOF_SHORT, sizeof(short)))
    {
    printf("Size of short is broken.\n");
    ret = 1;
    }
  return ret;
}