mi: validate unmarshal target before querying and unit-test setField (#2520)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-07 18:15:45 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 7d5342749a
commit 94dc2c0284
5 changed files with 230 additions and 100 deletions
-6
View File
@@ -65,9 +65,3 @@ func TestGetValue_CHAR16(t *testing.T) {
})
}
}
// Note: The CHAR16 unmarshal branch in unmarshalInstance (session.go) handles
// string and uint fields. Integration testing of this path requires a WMI class
// with a CHAR16 property, which is extremely rare. The setUintField and
// setIntField helpers used by the branch are covered by the signed/unsigned
// integer tests (Test_MI_QueryUnmarshal_SignedInt, Test_MI_Unmarshal_TypeMismatch).