~samwhited/xmpp

970e22e556e3a5d41e75341f7035aeb35191e3a4 — Sam Whited 5 years ago 1be5398
Add interface build-time checks for saslerr
1 files changed, 9 insertions(+), 0 deletions(-)

M internal/saslerr/errors_test.go
M internal/saslerr/errors_test.go => internal/saslerr/errors_test.go +9 -0
@@ 11,6 11,15 @@ import (
	"golang.org/x/text/language"
)

// Compile time tests that interfaces are satisfied
var (
	_ error           = Failure{}
	_ error           = (*Failure)(nil)
	_ xml.Marshaler   = Failure{}
	_ xml.Marshaler   = (*Failure)(nil)
	_ xml.Unmarshaler = (*Failure)(nil)
)

func TestErrorTextOrCondition(t *testing.T) {
	f := Failure{
		Condition: MechanismTooWeak,