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

Function TestOctalNumber

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

Source from the content-addressed store, hash-verified

18}
19
20func TestOctalNumber(t *testing.T) {
21 test.Bytes(t, octalNumber([]byte("0o0"), 0), []byte("0"))
22 test.Bytes(t, octalNumber([]byte("0o1"), 0), []byte("1"))
23 test.Bytes(t, octalNumber([]byte("0o775"), 0), []byte("509"))
24 test.Bytes(t, octalNumber([]byte("0o100000000000000000000"), 0), []byte("1152921504606846976"))
25 test.Bytes(t, octalNumber([]byte("0o1000000000000000000000"), 0), []byte("0o1000000000000000000000"))
26}
27
28func TestHexadecimalNumber(t *testing.T) {
29 test.Bytes(t, hexadecimalNumber([]byte("0x0"), 0), []byte("0"))

Callers

nothing calls this directly

Calls 2

octalNumberFunction · 0.85
BytesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…