|
PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
|
Unit tests for PROFINET block parsing, serialization, and decoding. More...
#include <gtest/gtest.h>#include "profinet/blocks.h"#include "profinet/indices.h"#include "profinet/wire.h"
Include dependency graph for test_blocks.cpp:Go to the source code of this file.
Functions | |
| TEST_F (BlocksTest, ParseBlockHeader) | |
| TEST_F (BlocksTest, ParseBlockHeaderRejectsTooShortData) | |
| TEST_F (BlocksTest, Align4) | |
| TEST_F (BlocksTest, ParseModuleDiffBlockAllOk) | |
| TEST_F (BlocksTest, ParseModuleDiffBlockWrongSubmodule) | |
| TEST_F (BlocksTest, ParseModuleDiffBlockRejectsWrongBlockType) | |
| TEST_F (BlocksTest, ParseModuleDiffBlockTooShortReturnsEmpty) | |
| TEST_F (BlocksTest, ParseRealIdentificationDataV10) | |
| TEST_F (BlocksTest, ParseRealIdentificationDataTooShortReturnsEmpty) | |
| TEST_F (BlocksTest, IODWriteMultipleBuilderBuildsValidPacket) | |
| TEST_F (BlocksTest, ExpectedSubmoduleBlockReqBuildsInputBlock) | |
| TEST_F (BlocksTest, ExpectedSubmoduleBlockReqInputOutputIncludesTwoDataDescriptions) | |
| TEST_F (BlocksTest, ExpectedSubmoduleBlockReqNoIoProducesOneDataDescription) | |
| TEST_F (BlocksTest, ParsePortStatistics) | |
| TEST_F (BlocksTest, ParsePortStatisticsTooShortReturnsNullopt) | |
| TEST_F (BlocksTest, ParsePdPortDataRealParsesSlotAndSubslot) | |
| TEST_F (BlocksTest, ParsePdPortDataRealDecodesAsciiPortId) | |
| TEST_F (BlocksTest, ParsePdPortDataRealDecodesExtendedLatin1PortId) | |
| TEST_F (BlocksTest, ParsePdPortDataRealParsesPeer) | |
| TEST_F (BlocksTest, ParsePdPortDataRealDecodesExtendedLatin1PeerIds) | |
| TEST_F (BlocksTest, ParsePdPortDataRealParsesMauType) | |
| TEST_F (BlocksTest, ParsePdPortDataRealParsesPortProperties) | |
| TEST_F (BlocksTest, ParsePdPortDataRealParsesCompletePortData) | |
| TEST_F (BlocksTest, ParsePdPortDataRealHandlesEmptyData) | |
| TEST_F (BlocksTest, ParsePdPortDataRealHandlesMissingPortIdLength) | |
| TEST_F (BlocksTest, ParsePdPortDataRealHandlesTruncatedPortId) | |
| TEST_F (BlocksTest, ParsePdPortDataRealHandlesMissingPeerCount) | |
| TEST_F (BlocksTest, DISABLED_ParsePdPortDataRealHandlesTruncatedPeerPortId) | |
Unit tests for PROFINET block parsing, serialization, and decoding.
Verifies the parsing and construction of PROFINET block data implemented by blocks.cpp.
The tests cover:
Definition in file test_blocks.cpp.
| TEST_F | ( | BlocksTest | , |
| Align4 | |||
| ) |
Definition at line 149 of file test_blocks.cpp.
References profinet::blocks::Align4().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| DISABLED_ParsePdPortDataRealHandlesTruncatedPeerPortId | |||
| ) |
Definition at line 810 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ExpectedSubmoduleBlockReqBuildsInputBlock | |||
| ) |
Definition at line 315 of file test_blocks.cpp.
References profinet::blocks::ExpectedSubmoduleBlockReq::AddSubmodule(), profinet::wire::Reader::SkipTo(), profinet::blocks::ExpectedSubmoduleBlockReq::ToBytes(), and profinet::wire::Reader::U16().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ExpectedSubmoduleBlockReqInputOutputIncludesTwoDataDescriptions | |||
| ) |
Definition at line 347 of file test_blocks.cpp.
References profinet::blocks::ExpectedSubmoduleBlockReq::AddSubmodule(), and profinet::blocks::ExpectedSubmoduleBlockReq::ToBytes().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ExpectedSubmoduleBlockReqNoIoProducesOneDataDescription | |||
| ) |
Definition at line 375 of file test_blocks.cpp.
References profinet::blocks::ExpectedSubmoduleBlockReq::AddSubmodule(), and profinet::blocks::ExpectedSubmoduleBlockReq::ToBytes().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| IODWriteMultipleBuilderBuildsValidPacket | |||
| ) |
Definition at line 264 of file test_blocks.cpp.
References profinet::blocks::IODWriteMultipleBuilder::AddWrite(), profinet::blocks::IODWriteMultipleBuilder::Build(), profinet::wire::Reader::SkipTo(), profinet::wire::Reader::U16(), and profinet::WRITE_MULTIPLE.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseBlockHeader | |||
| ) |
Definition at line 125 of file test_blocks.cpp.
References profinet::blocks::ParseBlockHeader().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseBlockHeaderRejectsTooShortData | |||
| ) |
Definition at line 141 of file test_blocks.cpp.
References profinet::blocks::ParseBlockHeader().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseModuleDiffBlockAllOk | |||
| ) |
Definition at line 164 of file test_blocks.cpp.
References profinet::MODULE_STATE_PROPER_MODULE, profinet::blocks::ParseModuleDiffBlock(), and profinet::SUBMODULE_STATE_OK.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseModuleDiffBlockRejectsWrongBlockType | |||
| ) |
Definition at line 209 of file test_blocks.cpp.
References profinet::blocks::ParseModuleDiffBlock().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseModuleDiffBlockTooShortReturnsEmpty | |||
| ) |
Definition at line 219 of file test_blocks.cpp.
References profinet::blocks::ParseModuleDiffBlock().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseModuleDiffBlockWrongSubmodule | |||
| ) |
Definition at line 185 of file test_blocks.cpp.
References profinet::MODULE_STATE_PROPER_MODULE, profinet::blocks::ParseModuleDiffBlock(), and profinet::SUBMODULE_STATE_WRONG_SUBMODULE.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealDecodesAsciiPortId | |||
| ) |
Definition at line 561 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealDecodesExtendedLatin1PeerIds | |||
| ) |
Definition at line 629 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal(), and profinet::blocks::PeerInfo::portId.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealDecodesExtendedLatin1PortId | |||
| ) |
Definition at line 577 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealHandlesEmptyData | |||
| ) |
Definition at line 742 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealHandlesMissingPeerCount | |||
| ) |
Definition at line 794 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealHandlesMissingPortIdLength | |||
| ) |
Definition at line 761 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealHandlesTruncatedPortId | |||
| ) |
Definition at line 776 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealParsesCompletePortData | |||
| ) |
Definition at line 695 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal(), and profinet::blocks::PeerInfo::portId.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealParsesMauType | |||
| ) |
Definition at line 655 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealParsesPeer | |||
| ) |
Definition at line 599 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal(), and profinet::blocks::PeerInfo::portId.
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealParsesPortProperties | |||
| ) |
Definition at line 670 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePdPortDataRealParsesSlotAndSubslot | |||
| ) |
Definition at line 546 of file test_blocks.cpp.
References profinet::blocks::ParsePdPortDataReal().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePortStatistics | |||
| ) |
Definition at line 407 of file test_blocks.cpp.
References profinet::blocks::ParsePortStatistics(), profinet::wire::PutU16(), and profinet::wire::PutU32().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParsePortStatisticsTooShortReturnsNullopt | |||
| ) |
Definition at line 430 of file test_blocks.cpp.
References profinet::blocks::ParsePortStatistics().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseRealIdentificationDataTooShortReturnsEmpty | |||
| ) |
Definition at line 250 of file test_blocks.cpp.
References profinet::blocks::ParseRealIdentificationData().
Here is the call graph for this function:| TEST_F | ( | BlocksTest | , |
| ParseRealIdentificationDataV10 | |||
| ) |
Definition at line 233 of file test_blocks.cpp.
References profinet::blocks::ParseRealIdentificationData().
Here is the call graph for this function: