/*
 * $Id$
 *
 * [ Description ]
 * 
 */

#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"

#define NB_PARAMS 0

void usage (string exec)
{
  cerr << "<Usage> " << exec << " name_instance list_params" << endl
       << "list_params is :" << endl;
//     << " - size_data     (unsigned int)" << endl
//     << " - nb_port       (unsigned int)" << endl;

  exit (1);
}

#ifndef SYSTEMC
int main    (int argc, char * argv[])
#else
int sc_main (int argc, char * argv[])
#endif
{
  if (argc != 2+NB_PARAMS)
    usage (argv[0]);

  const string   name      = argv[1];
//const uint32_t size_data = atoi(argv[2]);
//const uint32_t nb_port   = atoi(argv[3]);

  try 
    {
      morpheo::behavioural::@NAMESPACE_USE::Parameters param (//size_data,
							      //nb_port  
							     );
      
      cout << param.print(1);
      
      test (name,param);
    }
  catch (morpheo::ErrorMorpheo & error)
    {
      cout << "<" << name << "> : " <<  error.what ();
      return;
    }
  catch (...)
    {
      cerr << "<" << name << "> : This test must generate a error" << endl;
      exit (EXIT_FAILURE);
    }

  return (EXIT_SUCCESS);
}

