package rpc import ( "testing" ) func TestErrnoString(t *testing.T) { if EOpnotsupp.String() != "Operation not supported" { t.Error("Operation not supported") } } func TestIsError(t *testing.T) { if !EOpnotsupp.IsError() { t.Error("EOpNotSupp is an error") } if EWrnFirmwareActivateShortPresent.IsError() { t.Error("EWrnFirmwareActivateShortPresent is not an error") } } func TestIsWarning(t *testing.T) { if EOpnotsupp.IsWarning() { t.Error("EOpNotSupp is not a warning") } if !EWrnFirmwareActivateShortPresent.IsWarning() { t.Error("EWrnFirmwareActivateShortPresent is a warning") } }