Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

testdbm.c File Reference

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include "base/bitstring.h"
#include "dbm/dbm.h"
#include "dbm/gen.h"
#include "dbm/print.h"
#include "debug/macros.h"

Defines

#define PRINTF(S)   putc('.', stderr)
#define ENDL
#define LOOP   1000
#define DIFF(D1, D2)   dbm_printDiff(stderr, D1, D2, size)
#define DBM_EQUAL(D1, D2)   ASSERT(dbm_areEqual(D1,D2,size), DIFF(D1,D2))
#define DBM_SUBSET(D1, D2)
#define ADBM(NAME)   raw_t *NAME = allocDBM(size)
#define AVECT(NAME)   int32_t NAME[size]
#define ABITS(NAME)   uint32_t NAME[bits2intsize(size)]
#define DVECT(NAME)   double NAME[size]
#define RANGE()   ((rand()%10000)+10)
#define PROGRESS()   debug_spin(stderr)
#define DBM_GEN(D)

Functions

static raw_tallocDBM (uint32_t dim)
static void test_zero (uint32_t size)
static void test_relaxUp (uint32_t size)
static void test_relaxDown (uint32_t size)
static void test_relaxDownClock (uint32_t size)
static void test_relaxUpClock (uint32_t size)
static void test_freeDown (uint32_t size)
static void test_freeUp (uint32_t size)
static void test_freeAllUp (uint32_t size)
static void test_freeAllDown (uint32_t size)
static void test_freeClock (uint32_t size)
static void test_down (uint32_t size)
static void test_up (uint32_t size)
static void test_constrain (uint32_t size)
static void test_point (uint32_t size)
static void test_real_point (uint32_t size)
static void test_intersection (uint32_t size)
static void test_convexUnion (uint32_t size)
static void test_relation (uint32_t size)
static void test_init (uint32_t size)
static void test_generate (uint32_t size)
static void test_subset (uint32_t size)
static void test (uint32_t size)
int main (int argc, char *argv[])

Variables

static uint32_t allDBMs = 0
static uint32_t goodDBMs = 0

Define Documentation

#define ABITS NAME   )     uint32_t NAME[bits2intsize(size)]
 

#define ADBM NAME   )     raw_t *NAME = allocDBM(size)
 

#define AVECT NAME   )     int32_t NAME[size]
 

#define DBM_EQUAL D1,
D2   )     ASSERT(dbm_areEqual(D1,D2,size), DIFF(D1,D2))
 

#define DBM_GEN  ) 
 

Value:

do { \
  BOOL good = dbm_generate(D, size, RANGE());\
  allDBMs++; \
  goodDBMs += good; \
} while(0)

#define DBM_SUBSET D1,
D2   ) 
 

Value:

if (dbm_areEqual(D1,D2,size)) \
{\
    assert(dbm_relation(D1,D2,size) == base_EQUAL);\
}\
else\
{\
    assert(dbm_relation(D1,D2,size) == base_SUBSET);\
    assert(dbm_relation(D2,D1,size) == base_SUPERSET);\
}

#define DIFF D1,
D2   )     dbm_printDiff(stderr, D1, D2, size)
 

#define DVECT NAME   )     double NAME[size]
 

#define ENDL
 

#define LOOP   1000
 

#define PRINTF  )     putc('.', stderr)
 

 
#define PROGRESS  )     debug_spin(stderr)
 

 
#define RANGE  )     ((rand()%10000)+10)
 


Function Documentation

static raw_t* allocDBM uint32_t  dim  )  [static]
 

int main int  argc,
char *  argv[]
 

static void test uint32_t  size  )  [static]
 

static void test_constrain uint32_t  size  )  [static]
 

static void test_convexUnion uint32_t  size  )  [static]
 

static void test_down uint32_t  size  )  [static]
 

static void test_freeAllDown uint32_t  size  )  [static]
 

static void test_freeAllUp uint32_t  size  )  [static]
 

static void test_freeClock uint32_t  size  )  [static]
 

static void test_freeDown uint32_t  size  )  [static]
 

static void test_freeUp uint32_t  size  )  [static]
 

static void test_generate uint32_t  size  )  [static]
 

static void test_init uint32_t  size  )  [static]
 

static void test_intersection uint32_t  size  )  [static]
 

static void test_point uint32_t  size  )  [static]
 

static void test_real_point uint32_t  size  )  [static]
 

static void test_relation uint32_t  size  )  [static]
 

static void test_relaxDown uint32_t  size  )  [static]
 

static void test_relaxDownClock uint32_t  size  )  [static]
 

static void test_relaxUp uint32_t  size  )  [static]
 

static void test_relaxUpClock uint32_t  size  )  [static]
 

static void test_subset uint32_t  size  )  [static]
 

static void test_up uint32_t  size  )  [static]
 

static void test_zero uint32_t  size  )  [static]
 


Variable Documentation

uint32_t allDBMs = 0 [static]
 

uint32_t goodDBMs = 0 [static]
 


Generated on Fri Jun 30 00:02:46 2006 for Module dbm by  doxygen 1.4.2