You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added test case port_multiplicity_04
* Delete .vscode files
* Improved Test case
* Update in test case
* Update in test case
* Update in test case
* PR comments
This test ensures that the count and sequence of rtg_interfaces align with the defined order of the respective part ports. Additionally, it verifies that any unconnected ports are properly represented with an entry as (nullptr, 0). If an unconnected port is not listed or replaced with nullptr, a runtime exception "Insufficient interface replication" will occur.
5
+
6
+
In this example, kPort is defined in the Capsule A but is not connected to any other port. The position of kPort in the RTInterfaceDescriptor array is represented by nullptr for the name and 0 for the multiplicity.
ASSERT(sizeof(rtg_interfaces_a) / sizeof(rtg_interfaces_a[0]) == 4 , "Expected the size of rtg_interfaces_a to be 4, matching the number of ports in CapsuleA");
67
+
68
+
ASSERT(rtg_interfaces_a[1].name == nullptr , "Expected unconnected kPort to have nullptr name");
69
+
ASSERT(rtg_interfaces_a[1].replication == 0 , "Expected unconnected kPort to have 0 replication");
70
+
71
+
ASSERT(RTMemoryUtil::strcmp(rtg_interfaces_a[0].name, "bPort") == 0 , "Expected connected aPort to have nullptr name");
72
+
ASSERT(rtg_interfaces_a[0].replication == 1 , "Expected connected aPort to have 1 replication");
73
+
74
+
ASSERT(RTMemoryUtil::strcmp(rtg_interfaces_a[2].name, "dPort") == 0 , "Expected connected dPort to have nullptr name");
75
+
ASSERT(rtg_interfaces_a[2].replication == 5 , "Expected connected dPort to have 5 replication");
0 commit comments