| 141 | } |
| 142 | |
| 143 | void test_node() { |
| 144 | AttributeSet attr; |
| 145 | |
| 146 | Node n0; |
| 147 | n0.id = 0; |
| 148 | n0.attributes = &attr; |
| 149 | SIValue node = SI_Node(&n0); |
| 150 | |
| 151 | Node n0Other = n0; |
| 152 | SIValue nodeOther = SI_Node(&n0Other); |
| 153 | |
| 154 | // Validate same hashCode for the same value, different address. |
| 155 | uint64_t origHashCode = SIValue_HashCode(node); |
| 156 | uint64_t otherHashCode = SIValue_HashCode(nodeOther); |
| 157 | TEST_ASSERT(origHashCode == otherHashCode); |
| 158 | |
| 159 | // Change entity id. |
| 160 | Node n1 = n0; |
| 161 | n1.id = 1; |
| 162 | nodeOther = SI_Node(&n1); |
| 163 | otherHashCode = SIValue_HashCode(nodeOther); |
| 164 | TEST_ASSERT(origHashCode != otherHashCode); |
| 165 | } |
| 166 | |
| 167 | void test_array() { |
| 168 | SIValue arr = SI_EmptyArray(); |
nothing calls this directly
no test coverage detected