Skip to content

Commit 586af06

Browse files
Add test for undefined values equality checking
1 parent 4cf678a commit 586af06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vpr/test/test_undefined_value.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "vpr_types.h"
2+
#include "arch_types.h"
3+
#include "librrgraph_types.h"
4+
5+
// Make sure the 'unknown value' constants in VPR, LibArchFPGA and LibRRGraph are all equal to the same value (-1)
6+
// Ideally these values should be independent of each other, but since they might be compared with each other in
7+
// the project we enforce that they all have the same value.
8+
static_assert(UNDEFINED == -1 && ARCH_FPGA_UNDEFINED_VAL == -1 && LIBRRGRAPH_UNDEFINED_VAL == -1, "The 'undefined value' constants in VPR, LibArchFPGA and LibRRGraph all must equal -1.");

0 commit comments

Comments
 (0)