From 8b36630588204e7016174f03436883ea2976099d Mon Sep 17 00:00:00 2001 From: dh1tw Date: Fri, 30 Dec 2016 16:06:27 +0100 Subject: [PATCH] checking also error string --- encoder_test.go | 5 +++++ 1 file changed, 5 insertions(+) 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", -- 2.48.1