/****************************************************
*
* Test program for the prop filter.
*
*  take a 
*
*
*   
*
*
*
* created Apr 13 2002, dan {who else?}
*
*
*****************************************************/

#include <stdio.h>      //printf
#include "propaccumulator.h"


int main (void) { 
   
  CES_FIELD_TAG temp;
   
  printf("creating proplist\n");
  PropAccum PropList;
  
  printf("setting owner = 1, index = 2, position = 50, type = 4\n");
  if (PropList.set(1l, 2l, 50, 4) != 0) {
    printf("success.\n");
  } else {
    printf("failure.\n");
  }
  
  printf("getting values for owner = 1, index = 2\n");
  if (PropList.get(1, 2, &temp) != NULL) {
    printf("success: result: owner = %ld, index = %ld, position = %lld, type = %d \n", 
       temp.getOwner(), temp.getIndex(), temp.getPosition(), temp.getType());
  } else {
    printf("unsuccessfull.\n");
  }
  
  printf("resetting values: owner = 1, index = 2, position = 20, type = 7\n");
  if (PropList.set(1, 2, 20, 7)) {
    printf("success.\n");
  } else {
    printf("failure.\n");
  }
  
  printf("getting values for owner = 1, index = 2\n");
  if (PropList.get(1, 2, &temp) != NULL) {
    printf("success: result: owner = %ld, index = %ld, position = %lld, type = %d \n", 
        temp.getOwner(), temp.getIndex(), temp.getPosition(), temp.getType());
  } else {
    printf("unsuccessfull.\n");
  }

  printf("done tests.\n");
  

}




