unit: complete coverage of generate code

This commit is contained in:
Dan Kortschak
2019-11-20 06:42:22 +10:30
parent 0d9ff7fffe
commit 6d55676c7d
62 changed files with 255 additions and 31 deletions

View File

@@ -21,6 +21,13 @@ func TestCurrent(t *testing.T) {
if got != Current(value) {
t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value)
}
if got != got.Current() {
t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value)
}
err = got.From(ether(1))
if err == nil {
t.Errorf("expected error for ether to %T conversion", got)
}
}
}