mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-19 16:47:16 +03:00
23 lines
511 B
Go
23 lines
511 B
Go
// +build !amd64
|
|
|
|
package fasthttp
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestReadHexIntSuccess(t *testing.T) {
|
|
testReadHexIntSuccess(t, "0", 0)
|
|
testReadHexIntSuccess(t, "fF", 0xff)
|
|
testReadHexIntSuccess(t, "00abc", 0xabc)
|
|
testReadHexIntSuccess(t, "7ffffff", 0x7ffffff)
|
|
testReadHexIntSuccess(t, "000", 0)
|
|
testReadHexIntSuccess(t, "1234ZZZ", 0x1234)
|
|
}
|
|
|
|
func TestParseUintSuccess(t *testing.T) {
|
|
testParseUintSuccess(t, "0", 0)
|
|
testParseUintSuccess(t, "123", 123)
|
|
testParseUintSuccess(t, "123456789", 123456789)
|
|
}
|