chore: structure basic
[KDIS.git] / Tests / UnitTests / PDU_EncodeDecode7.cpp
blobd0ff24a5c49bef6949db93322df452812009a607
1 #include <iostream>
2 #include "gtest/gtest.h"
4 #include "KDIS/KDefines.h"
6 #if DIS_VERSION > 6
8 #include "KDIS/PDU/Entity_Info_Interaction/Attribute_PDU.h"
9 #include "KDIS/PDU/Information_Operations/IO_Action_PDU.h"
10 #include "KDIS/PDU/Information_Operations/IO_Report_PDU.h"
12 using namespace KDIS;
13 using namespace PDU;
15 //////////////////////////////////////////////////////////////////////////
16 // Entity Info Interaction
17 //////////////////////////////////////////////////////////////////////////
19 TEST(PDU_EncodeDecode7, Attribute_PDU)
21 Attribute_PDU pduIn;
22 KDataStream stream = pduIn.Encode();
23 Attribute_PDU pduOut(stream);
24 EXPECT_EQ(pduIn, pduOut);
25 EXPECT_EQ(0, stream.GetBufferSize());
28 //////////////////////////////////////////////////////////////////////////
29 // Information Operations
30 //////////////////////////////////////////////////////////////////////////
32 TEST(PDU_EncodeDecode7, IO_Action_PDU)
34 IO_Action_PDU pduIn;
35 KDataStream stream = pduIn.Encode();
36 IO_Action_PDU pduOut(stream);
37 EXPECT_EQ(pduIn, pduOut);
38 EXPECT_EQ(0, stream.GetBufferSize());
41 TEST(PDU_EncodeDecode7, IO_Report_PDU)
43 IO_Report_PDU pduIn;
44 KDataStream stream = pduIn.Encode();
45 IO_Report_PDU pduOut(stream);
46 EXPECT_EQ(pduIn, pduOut);
47 EXPECT_EQ(0, stream.GetBufferSize());
50 #endif