/*
 * File:   newsimpletest.c
 * Author: elenar
 *
 * Created on 30.12.2010, 17:25:55
 */

#include <stdio.h>
#include <stdlib.h>
#include "cell.h"
#include "element.h"
#include "matrix.h"

/*
 * Simple C Test Suite
 */

void test1()
{
  printf("cell_test test 1\n");

  cell * c11 = cell_alloc (1, 1);
  char * ptext = "Woooohoo";
  cell_set (c11, 0, 0, element_alloc_string(ptext));

  long unsigned int i, j;

  matrix * mat1 = matrix_alloc(3, 2);

  for (i = 0; i < 3; i++) {

    for (j = 0; j < 2; j++) {

      matrix_set(mat1, i, j, i + j);

    }

  }

  cell * pc = cell_alloc(2, 2);
  cell_set(pc, 0, 0, element_alloc_matrix (mat1));
  cell_set(pc, 1, 1, element_alloc_cell(c11));

  cell_print_info(pc);

}

int main(int argc, char** argv)
{
  printf("%%SUITE_STARTING%% cell_test\n");
  printf("%%SUITE_STARTED%%\n");

  printf("%%TEST_STARTED%% test1 (cell_test)\n");
  test1();
  printf("%%TEST_FINISHED%% time=0 test1 (cell_test) \n");
  return (EXIT_SUCCESS);
}
