Skip to content

Commit

Permalink
Test for null node scenario (#581)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lavin <[email protected]>

Signed-off-by: Chris Lavin <[email protected]>
  • Loading branch information
clavin-xlnx authored Nov 15, 2022
1 parent 6f6ea92 commit eab01d4
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/src/com/xilinx/rapidwright/device/TestNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@

package com.xilinx.rapidwright.device;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

import java.util.Collection;
import java.util.HashSet;
import java.util.List;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;

public class TestNode {
@ParameterizedTest
@CsvSource({
Expand All @@ -56,5 +57,12 @@ public void testGetDownhillUphillNodesUnique(String deviceName, String nodeName)
Collection<Node> uphillUnique = node.getAllUphillNodes(new HashSet<>());
Assertions.assertEquals(uphillUnique.size(), new HashSet<>(uphillUnique).size());
}

@Test
public void testNullNode() {
Device d = Device.getDevice("xcvm1802-vfvc1760-1LHP-i-L");
PIP p = d.getPIP("BLI_LS_CORE_X90Y335/BLI_LS_CORE_R180.HSR_GRP1_A_BLI_LOGIC_OUTS0->>BLI_GRP1_A_BLI_LOGIC_OUTS0");
Assertions.assertNull(p.getStartNode());
}
}

0 comments on commit eab01d4

Please sign in to comment.