()
| 113 | } |
| 114 | |
| 115 | public void testReadUnion() { |
| 116 | SizedUnion u = new SizedUnion(); |
| 117 | final int VALUE = 0x12345678; |
| 118 | u.getPointer().setInt(0, VALUE); |
| 119 | u.read(); |
| 120 | assertEquals("int field not read properly", VALUE, u.intField); |
| 121 | assertTrue("byte field not read", u.byteField != 0); |
| 122 | assertTrue("short field not read", u.shortField != 0); |
| 123 | assertTrue("long field not read", u.longField != 0); |
| 124 | assertNotNull("Unselected Pointer not read", u.pointer); |
| 125 | assertNotNull("Union struct field should be initialized", u.structField); |
| 126 | assertNull("Unselected structure should not be read", u.structField.value); |
| 127 | assertNull("Unselected String should be null", u.string); |
| 128 | assertNull("Unselected WString should be null", u.wstring); |
| 129 | } |
| 130 | |
| 131 | public void testWriteTypedUnion() { |
| 132 | final int VALUE = 0x12345678; |
nothing calls this directly
no test coverage detected