summaryrefslogtreecommitdiff
path: root/cesar/maximus/sci/utest/scimsg/inc/TestEther.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/maximus/sci/utest/scimsg/inc/TestEther.h')
-rw-r--r--cesar/maximus/sci/utest/scimsg/inc/TestEther.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/cesar/maximus/sci/utest/scimsg/inc/TestEther.h b/cesar/maximus/sci/utest/scimsg/inc/TestEther.h
new file mode 100644
index 0000000000..065c93c329
--- /dev/null
+++ b/cesar/maximus/sci/utest/scimsg/inc/TestEther.h
@@ -0,0 +1,50 @@
+#ifndef maximus_sci_utest_scimsg_inc_testether_h
+#define maximus_sci_utest_scimsg_inc_testether_h
+/* Maximus project {{{
+ *
+ * Copyright (C) 2012 MStar Semiconductor
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file maximus/sci/utest/scimsg/inc/TestEther.h
+ * \ingroup maximus_sci_utest_scimsg
+ *
+ */
+#include "maximus/common/types.h"
+#include "maximus/interface/station/station.h"
+#include "maximus/sci/sci_msg.h"
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestEther : public CPPUNIT_NS::TestFixture
+{
+ CPPUNIT_TEST_SUITE (TestEther);
+ CPPUNIT_TEST (test_encode);
+ CPPUNIT_TEST (test_decode);
+ CPPUNIT_TEST_SUITE_END ();
+
+public:
+
+ void setUp ();
+ void tearDown ();
+
+private:
+
+ stations_list_t fake_sta_list;
+ Network_Clock_Tick time_base;
+ SciServer *fake_server;
+
+ void __build_ether_msg (
+ unsigned char *expected,
+ size_t msg_size,
+ size_t data_size,
+ Sci_Msg_Station_Id test_staid,
+ Ethernet_Type test_type);
+
+ void test_encode ();
+ void test_decode ();
+};
+
+#endif /* maximus_sci_utest_scimsg_inc_testether_h */