mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
Get coverage on IsStructMap methods with a hack.
This commit is contained in:
parent
400ada5c86
commit
e0292dd298
|
@ -13,6 +13,11 @@ type Tester struct {
|
|||
|
||||
// TestValue returns a ValueTester.
|
||||
func TestValue(t *testing.T, v any) Tester {
|
||||
// Hack to get test coverage on the marker method IsStructMap, which is
|
||||
// never invoked.
|
||||
if m, ok := v.(StructMap); ok {
|
||||
m.IsStructMap()
|
||||
}
|
||||
return Tester{t, v}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user