summaryrefslogtreecommitdiff
path: root/cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c')
-rw-r--r--cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c b/cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c
new file mode 100644
index 0000000000..993bffaaaa
--- /dev/null
+++ b/cesar/cp/eoc/cco/action/test/utest_mcast/src/fsm_stub.c
@@ -0,0 +1,55 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file src/fsm_stub.c
+ * \brief FSM stub.
+ * \ingroup test
+ */
+#include "common/std.h"
+#include "cp/fsm/fsm.h"
+
+#include "lib/scenario/scenario.h"
+
+cp_fsm_event_t *
+cp_fsm_event_bare_new (cp_t *ctx, cp_fsm_event_type_t type)
+{
+ dbg_assert (ctx);
+ switch (type)
+ {
+ case CP_FSM_EVENT_TYPE_net_list_empty:
+ /* Ignore. */
+ return INVALID_PTR;
+ case CP_FSM_EVENT_TYPE_sta_status_changed:
+ if (!scenario.current ||
+ (scenario.current->params.event_cp_fsm_event_bare_new.type != type))
+ return INVALID_PTR;
+
+ default:
+ ;
+ }
+ scenario_event (cp_fsm_event_bare_new, param);
+ test_fail_unless (type == param->type);
+ return INVALID_PTR;
+}
+
+cp_fsm_event_t *
+cp_fsm_event_mme_new (cp_t *ctx, cp_fsm_event_type_t type, cp_mme_rx_t *mme)
+{
+ dbg_assert (ctx);
+ scenario_event (cp_fsm_event_mme_new, param);
+ test_fail_unless (type == param->type);
+ return INVALID_PTR;
+}
+
+void
+cp_fsm_branch_ (cp_t *ctx, cp_fsm_branch_t branch)
+{
+ dbg_assert (ctx);
+ scenario_event (cp_fsm_branch, param);
+ test_fail_unless (branch == param->branch);
+}