aboutsummaryrefslogtreecommitdiff
path: root/bytesconv_32_test.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-28 23:11:07 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-28 23:11:07 +0200
commitc04fdb47a5b120920be623651bafedba4aca3065 (patch)
tree588ed78cd16e08e76231d9b10fd8ccc45241109d /bytesconv_32_test.go
parentAdded a benchmark for writeHexInt (diff)
downloadfasthttp-c04fdb47a5b120920be623651bafedba4aca3065.tar.gz
fasthttp-c04fdb47a5b120920be623651bafedba4aca3065.tar.bz2
fasthttp-c04fdb47a5b120920be623651bafedba4aca3065.zip
Test writeHexInt for 32-bit and 64-bit architectures
Diffstat (limited to 'bytesconv_32_test.go')
-rw-r--r--bytesconv_32_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/bytesconv_32_test.go b/bytesconv_32_test.go
index 5f499e9..90223c0 100644
--- a/bytesconv_32_test.go
+++ b/bytesconv_32_test.go
@@ -6,6 +6,13 @@ import (
"testing"
)
+func TestWriteHexInt(t *testing.T) {
+ testWriteHexInt(t, 0, "0")
+ testWriteHexInt(t, 1, "1")
+ testWriteHexInt(t, 0x123, "123")
+ testWriteHexInt(t, 0x7fffffff, "7fffffff")
+}
+
func TestAppendUint(t *testing.T) {
testAppendUint(t, 0)
testAppendUint(t, 123)