File: debug_test.go

package info (click to toggle)
golang-etcd 0.2.0~rc1%2Bgit20140717-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-backports, jessie-kfreebsd
  • size: 188 kB
  • ctags: 165
  • sloc: makefile: 5
file content (28 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package etcd

import (
	"testing"
)

type Foo struct{}
type Bar struct {
	one string
	two int
}

// Tests that logs don't panic with arbitrary interfaces
func TestDebug(t *testing.T) {
	f := &Foo{}
	b := &Bar{"asfd", 3}
	for _, test := range []interface{}{
		1234,
		"asdf",
		f,
		b,
	} {
		logger.Debug(test)
		logger.Debugf("something, %s", test)
		logger.Warning(test)
		logger.Warningf("something, %s", test)
	}
}