1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
11 func TestTagParsing(t
*testing
.T
) {
12 name
, opts
:= parseTag("field,foobar,foo")
14 t
.Fatalf("name = %q, want field", name
)
16 for _
, tt
:= range []struct {
24 if opts
.Contains(tt
.opt
) != tt
.want
{
25 t
.Errorf("Contains(%q) = %v", tt
.opt
, !tt
.want
)