summaryrefslogtreecommitdiff
path: root/rrdformat/errors_binary_test.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2020-01-26 14:11:07 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2020-01-26 14:11:28 -0500
commit1f5dbbbab170bc7f6dd2d47c7aface716ecb294c (patch)
tree5b956d920455036b9ae7a675b4e497a76edbb314 /rrdformat/errors_binary_test.go
parenta5cba20c1e3b0956737327ef9214fd2cbc221add (diff)
wip
Diffstat (limited to 'rrdformat/errors_binary_test.go')
-rw-r--r--rrdformat/errors_binary_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/rrdformat/errors_binary_test.go b/rrdformat/errors_binary_test.go
deleted file mode 100644
index f420a1b..0000000
--- a/rrdformat/errors_binary_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package rrdformat
-
-import (
- "fmt"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestBinaryError(t *testing.T) {
- assert := assert.New(t)
-
- bad404 := []byte(`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"`)
- err := newBinError("not an RRD file: wrong magic number", bad404, 0, 4)
- assert.Equal(err.Error(), `invalid RRD: not an RRD file: wrong magic number`)
- assert.Equal(fmt.Sprintf("%v", err), `invalid RRD: not an RRD file: wrong magic number`)
- assert.Equal(fmt.Sprintf("%q", err), `"invalid RRD: not an RRD file: wrong magic number"`)
- assert.Equal(fmt.Sprintf("%+v", err), `invalid RRD: not an RRD file: wrong magic number
- at byte 0:
- ascii: < ! D O
- hex : 3c 21 44 4f
-`)
-
- badShort := []byte{'R'}
- err = newBinError("not an RRD file: wrong magic number", badShort, 0, 4)
- assert.Equal(err.Error(), `invalid RRD: not an RRD file: wrong magic number`)
- assert.Equal(fmt.Sprintf("%v", err), `invalid RRD: not an RRD file: wrong magic number`)
- assert.Equal(fmt.Sprintf("%q", err), `"invalid RRD: not an RRD file: wrong magic number"`)
- assert.Equal(fmt.Sprintf("%+v", err), `invalid RRD: not an RRD file: wrong magic number
- at byte 0:
- ascii: R <EOF>
- hex : 52 <EOF>
-`)
-}