1234567891011121314151617181920212223242526272829303132333435363738 |
- /* Generated by YAKINDU Statechart Tools code generator. */
- #include "gtest/gtest.h"
- #include "LogicalAnd.h"
- #include "sc_timer_service.h"
- //! The timers are managed by a timer service. */
- static sc_unit_timer_service_t timer_service;
- static LogicalAnd statechart;
- class LogicalAndTests : public ::testing::Test{
- protected:
- virtual void SetUp() {
- logicalAnd_init(&statechart);
- sc_timer_service_init(
- &timer_service,
- 0,
- (sc_run_cycle_fp) &logicalAnd_runCycle,
- false,
- 200,
- &statechart
- );
- }
- };
- TEST_F(LogicalAndTests, operandEvaluationOrder) {
- logicalAnd_enter(&statechart);
- sc_timer_service_proceed_cycles(&timer_service, 1);
- EXPECT_TRUE(logicalAndIface_get_x(&statechart)== 4l && logicalAndIface_get_b(&statechart)) << "logical and expression was executed in wrong order..." ;
- }
|