forked from makiuchi-d/gozxing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
encode_hint_type_test.go
30 lines (27 loc) · 1.38 KB
/
encode_hint_type_test.go
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
29
30
package gozxing
import (
"testing"
)
func testEncodeHintType_String(t testing.TB, h EncodeHintType, e string) {
t.Helper()
if s := h.String(); s != e {
t.Fatalf("DecodeHintType(%d) stringified \"%s\", expect \"%s\"", h, s, e)
}
}
func TestEncodeHintType_String(t *testing.T) {
testEncodeHintType_String(t, EncodeHintType_ERROR_CORRECTION, "ERROR_CORRECTION")
testEncodeHintType_String(t, EncodeHintType_CHARACTER_SET, "CHARACTER_SET")
testEncodeHintType_String(t, EncodeHintType_DATA_MATRIX_SHAPE, "DATA_MATRIX_SHAPE")
testEncodeHintType_String(t, EncodeHintType_MIN_SIZE, "MIN_SIZE")
testEncodeHintType_String(t, EncodeHintType_MAX_SIZE, "MAX_SIZE")
testEncodeHintType_String(t, EncodeHintType_MARGIN, "MARGIN")
testEncodeHintType_String(t, EncodeHintType_PDF417_COMPACT, "PDF417_COMPACT")
testEncodeHintType_String(t, EncodeHintType_PDF417_COMPACTION, "PDF417_COMPACTION")
testEncodeHintType_String(t, EncodeHintType_PDF417_DIMENSIONS, "PDF417_DIMENSIONS")
testEncodeHintType_String(t, EncodeHintType_AZTEC_LAYERS, "AZTEC_LAYERS")
testEncodeHintType_String(t, EncodeHintType_QR_VERSION, "QR_VERSION")
testEncodeHintType_String(t, EncodeHintType_QR_MASK_PATTERN, "QR_MASK_PATTERN")
testEncodeHintType_String(t, EncodeHintType_GS1_FORMAT, "GS1_FORMAT")
testEncodeHintType_String(t, EncodeHintType_FORCE_CODE_SET, "FORCE_CODE_SET")
testEncodeHintType_String(t, EncodeHintType(-1), "")
}