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

Function TestNewMessageWithGroups

message_test.go:120–283  ·  view source on GitHub ↗

TestNewMessageWithGroups tests the NewMessageWithGroups function.

(t *testing.T)

Source from the content-addressed store, hash-verified

118
119// TestNewMessageWithGroups tests the NewMessageWithGroups function.
120func TestNewMessageWithGroups(t *testing.T) {
121 // Populate groups
122 ops := Group{
123 TagOperationGroup,
124 Attributes{
125 MakeAttr("ops", TagInteger, Integer(1)),
126 },
127 }
128
129 prn1 := Group{
130 TagPrinterGroup,
131 Attributes{
132 MakeAttr("prn1", TagInteger, Integer(2)),
133 },
134 }
135
136 prn2 := Group{
137 TagPrinterGroup,
138 Attributes{
139 MakeAttr("prn2", TagInteger, Integer(3)),
140 },
141 }
142
143 prn3 := Group{
144 TagPrinterGroup,
145 Attributes{
146 MakeAttr("prn3", TagInteger, Integer(4)),
147 },
148 }
149
150 job := Group{
151 TagJobGroup,
152 Attributes{
153 MakeAttr("job", TagInteger, Integer(5)),
154 },
155 }
156
157 unsupp := Group{
158 TagUnsupportedGroup,
159 Attributes{
160 MakeAttr("unsupp", TagInteger, Integer(6)),
161 },
162 }
163
164 sub := Group{
165 TagSubscriptionGroup,
166 Attributes{
167 MakeAttr("sub", TagInteger, Integer(7)),
168 },
169 }
170
171 evnt := Group{
172 TagEventNotificationGroup,
173 Attributes{
174 MakeAttr("evnt", TagInteger, Integer(8)),
175 },
176 }
177

Callers

nothing calls this directly

Calls 3

MakeAttrFunction · 0.85
IntegerTypeAlias · 0.85
NewMessageWithGroupsFunction · 0.85

Tested by

no test coverage detected