MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / TestMakeAttribute

Function TestMakeAttribute

attr_test.go:184–195  ·  view source on GitHub ↗

TestMakeAttribute tests MakeAttribute function

(t *testing.T)

Source from the content-addressed store, hash-verified

182
183// TestMakeAttribute tests MakeAttribute function
184func TestMakeAttribute(t *testing.T) {
185 a1 := Attribute{
186 Name: "attr",
187 Values: Values{{TagInteger, Integer(1)}},
188 }
189
190 a2 := MakeAttribute("attr", TagInteger, Integer(1))
191
192 if !a1.Equal(a2) {
193 t.Errorf("MakeAttribute test failed")
194 }
195}
196
197// TestAttributesCopy tests Attributes.Clone and Attributes.DeepCopy
198func TestAttributesCopy(t *testing.T) {

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.95
IntegerTypeAlias · 0.85
MakeAttributeFunction · 0.85

Tested by

no test coverage detected