MCPcopy
hub / github.com/tdewolff/minify / TestHexadecimalNumber

Function TestHexadecimalNumber

js/util_test.go:28–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestHexadecimalNumber(t *testing.T) {
29 test.Bytes(t, hexadecimalNumber([]byte("0x0"), 0), []byte("0"))
30 test.Bytes(t, hexadecimalNumber([]byte("0x1"), 0), []byte("1"))
31 test.Bytes(t, hexadecimalNumber([]byte("0xFE"), 0), []byte("254"))
32 test.Bytes(t, hexadecimalNumber([]byte("0x1000000000"), 0), []byte("68719476736"))
33 test.Bytes(t, hexadecimalNumber([]byte("0xd000000000"), 0), []byte("893353197568"))
34 test.Bytes(t, hexadecimalNumber([]byte("0xe000000000"), 0), []byte("0xe000000000"))
35 test.Bytes(t, hexadecimalNumber([]byte("0xE000000000"), 0), []byte("0xE000000000"))
36 test.Bytes(t, hexadecimalNumber([]byte("0x10000000000"), 0), []byte("0x10000000000"))
37}
38
39func TestString(t *testing.T) {
40 tests := []struct {

Callers

nothing calls this directly

Calls 2

hexadecimalNumberFunction · 0.85
BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…