]> Sergey Matveev's repositories - go-opus.git/commitdiff
checking also error string
authordh1tw <tobias@dh1tw.de>
Fri, 30 Dec 2016 15:06:27 +0000 (16:06 +0100)
committerdh1tw <tobias@dh1tw.de>
Fri, 30 Dec 2016 15:06:27 +0000 (16:06 +0100)
encoder_test.go

index 439179141b7528861a4ec293e3a35698dce1557c..ba13ea2ba9dacd2c4a3d15b15eeb160e9cdb3e66 100644 (file)
@@ -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",