PROFINET IO Controller Stack 1.0.0
Modern C++ implementation of a PROFINET IO Controller stack
Loading...
Searching...
No Matches
test_IOSignal.cpp File Reference

Unit tests for the GSDML-derived logical process-data signal catalogue. More...

#include <gtest/gtest.h>
#include <algorithm>
#include <cstdint>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
#include "profinet/IOSignal.h"
+ Include dependency graph for test_IOSignal.cpp:

Go to the source code of this file.

Namespaces

namespace  profinet
 
namespace  profinet::io
 

Functions

 profinet::io::TEST (IoSignalTypeTests, ClassifiesAllDoubleCompatibleScalarTypes)
 
 profinet::io::TEST (IoSignalTypeTests, ClassifiesUnsupportedAndUnknownTypes)
 
 profinet::io::TEST (IoSignalReservedTests, DetectsReservedTextIdsCaseInsensitively)
 
 profinet::io::TEST (IoSignalReservedTests, DoesNotMisclassifyNormalSignals)
 
 profinet::io::TEST (IoSignalTests, DirectionAccessorsReportCorrectDirection)
 
 profinet::io::TEST (IoSignalTests, DoubleCompatibilityAccessorMirrorsFlag)
 
 profinet::io::TEST (IoSignalCatalogTests, EmptyDeviceProducesEmptyCatalogue)
 
 profinet::io::TEST (IoSignalCatalogTests, SeparatesInputAndOutputSignals)
 
 profinet::io::TEST (IoSignalCatalogTests, CalculatesIndependentInputAndOutputOffsets)
 
 profinet::io::TEST (IoSignalCatalogTests, ZeroLengthDataItemDoesNotAdvanceOffset)
 
 profinet::io::TEST (IoSignalCatalogTests, NegativeDataItemLengthThrows)
 
 profinet::io::TEST (IoSignalCatalogTests, EmptyTextIdUsesFallbackName)
 
 profinet::io::TEST (IoSignalCatalogTests, FiltersReservedItems)
 
 profinet::io::TEST (IoSignalCatalogTests, ReservedItemStillAdvancesOffset)
 
 profinet::io::TEST (IoSignalCatalogTests, KeepsUnsupportedSignalsWithCompatibilityFalse)
 
 profinet::io::TEST (IoSignalCatalogTests, SupportedScalarSignalsAreDoubleCompatible)
 
 profinet::io::TEST (IoSignalCatalogTests, PreservesModuleAndSubmoduleMetadata)
 
 profinet::io::TEST (IoSignalCatalogTests, CombinesAndNormalizesPossibleModuleSlots)
 
 profinet::io::TEST (IoSignalCatalogTests, CombinesAndNormalizesPossibleInlineSubmoduleSlots)
 
 profinet::io::TEST (IoSignalCatalogTests, IncludesAllModulesWhenNoModuleReferencesExist)
 
 profinet::io::TEST (IoSignalCatalogTests, UsesOnlyReferencedModulesWhenReferencesExist)
 
 profinet::io::TEST (IoSignalCatalogTests, MergesDuplicateModuleReferences)
 
 profinet::io::TEST (IoSignalCatalogTests, ResolvesGlobalSubmoduleReference)
 
 profinet::io::TEST (IoSignalCatalogTests, PrefersInlineSubmoduleOverDuplicateGlobalReference)
 
 profinet::io::TEST (IoSignalCatalogTests, UnknownModuleReferenceThrows)
 
 profinet::io::TEST (IoSignalCatalogTests, MergesDuplicateSubmoduleReferences)
 
 profinet::io::TEST (IoSignalCatalogTests, UnknownSubmoduleReferenceThrows)
 
 profinet::io::TEST (IoSignalCatalogTests, IncludesDapVirtualSubmoduleSignals)
 
 profinet::io::TEST (IoSignalCatalogTests, RetainsDuplicateSignalNamesAcrossSubmodules)
 
 profinet::io::TEST (IoSignalCatalogTests, MaintainsDeterministicCatalogueOrder)
 
 profinet::io::TEST (IoSignalCatalogTests, ExpandsBitDataItemsIntoIndividualSignals)
 
 profinet::io::TEST (IoSignalCatalogTests, BitSignalsAreBooleanAndDoubleCompatible)
 
 profinet::io::TEST (IoSignalCatalogTests, BitDataItemDoesNotCreateParentSignal)
 
 profinet::io::TEST (IoSignalCatalogTests, ConvertsBitOffsetToByteAndBitOffset)
 
 profinet::io::TEST (IoSignalCatalogTests, BitSignalsRetainParentDataItemOffset)
 

Detailed Description

Unit tests for the GSDML-derived logical process-data signal catalogue.

Covers DataType classification, reserved-signal filtering, process-data offset calculation, module/submodule resolution, possible placement metadata, DAP signals, duplicate definitions, malformed lengths, and unsupported data types.

The tests use the existing GSDML data model directly. Integration tests that parse real GSDML XML files belong in test_gsdml.cpp or a dedicated GSDML integration test and are intentionally kept separate here.

Definition in file test_IOSignal.cpp.