From: dh1tw Date: Fri, 30 Dec 2016 15:06:27 +0000 (+0100) Subject: checking also error string X-Git-Tag: v2.0.0~38^2~2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8b36630588204e7016174f03436883ea2976099d;p=go-opus.git checking also error string --- diff --git a/encoder_test.go b/encoder_test.go index 4391791..ba13ea2 100644 --- a/encoder_test.go +++ b/encoder_test.go @@ -134,10 +134,15 @@ func TestEncoder_SetGetInvalidComplexity(t *testing.T) { if err == nil { t.Errorf("Expected Error invalid complexity value: %d", complexity) } + if err.Error() != "opus: invalid argument" { + t.Error("Unexpected Error message") + } + cpx, err := enc.Complexity() if err != nil { t.Error("Error getting complexity value", err) } + // default complexity value is 9 if cpx != 9 { t.Errorf("Unexpected complexity value. Got %d, but expected %d",