#ifdef VHDL_TESTBENCH
/*
 * $Id: Interface_testbench_test_ok.cpp 81 2008-04-15 18:40:01Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Interface.h"
#include "Behavioural/include/Entity.h"

namespace morpheo              {
namespace behavioural          {

  std::string Interface::testbench_test_ok (Vhdl * & vhdl)
  {
    log_printf(FUNC,Behavioural,"testbench_test_ok","Begin");

    std::string test_name = testbench_test_ok_name(vhdl);

    vhdl->set_body(test_name + " <= '1' when true");

    // set all condition
    if (_list_signal->empty()== false)
      {
	std::list<Signal*>::iterator i     = _list_signal->begin();

	while (i != _list_signal->end())
	  {
	    (*i)->testbench_test_ok(vhdl);
	    ++i;
	  }
      }
    vhdl->set_body("\telse '0';");
    vhdl->set_body("");

    log_printf(FUNC,Behavioural,"testbench_test_ok","End");

    return test_name;
  };

}; // end namespace behavioural          
}; // end namespace morpheo              
#endif
