File: header_test.go

package info (click to toggle)
golang-github-googleapis-gax-go 0.0~git20170902.8c160ca-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 128 kB
  • ctags: 83
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package gax

import "testing"

func TestXGoogHeader(t *testing.T) {
	for _, tst := range []struct {
		kv   []string
		want string
	}{
		{nil, ""},
		{[]string{"abc", "def"}, "abc/def"},
		{[]string{"abc", "def", "xyz", "123", "foo", ""}, "abc/def xyz/123 foo/"},
	} {
		got := XGoogHeader(tst.kv...)
		if got != tst.want {
			t.Errorf("Header(%q) = %q, want %q", tst.kv, got, tst.want)
		}
	}
}