File: error_test.go

package info (click to toggle)
golang-github-masterzen-winrm 0.0~git20200615.c42b513-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 288 kB
  • sloc: makefile: 28; sh: 14
file content (20 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package winrm

import (
	"errors"

	. "gopkg.in/check.v1"
)

func (s *WinRMSuite) TestError(c *C) {

	err := errWinrm{
		message: "Some test error",
	}
	same := errors.New("Some test error")
	func(err, same error) {
		t, ok := err.(errWinrm)
		c.Assert(ok, Equals, true)
		c.Assert(t.Error(), Equals, same.Error())
	}(err, same)
}