aboutsummaryrefslogtreecommitdiff
path: root/bytesconv_32_test.go
diff options
context:
space:
mode:
authorGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-28 23:00:10 +0200
committerGravatar Aliaksandr Valialkin <valyala@gmail.com> 2015-11-28 23:00:10 +0200
commit974a1c99ce30e20a0353e5ba7623e46164d88640 (patch)
tree6cf7a19ef663b802eba1fadcb272d83c289e4995 /bytesconv_32_test.go
parentAdded timing test for AppendUint (diff)
downloadfasthttp-974a1c99ce30e20a0353e5ba7623e46164d88640.tar.gz
fasthttp-974a1c99ce30e20a0353e5ba7623e46164d88640.tar.bz2
fasthttp-974a1c99ce30e20a0353e5ba7623e46164d88640.zip
Optimized AppendUint by using stack-based buffer instead of uintBufPool
Diffstat (limited to 'bytesconv_32_test.go')
-rw-r--r--bytesconv_32_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/bytesconv_32_test.go b/bytesconv_32_test.go
index d660096..5f499e9 100644
--- a/bytesconv_32_test.go
+++ b/bytesconv_32_test.go
@@ -6,6 +6,12 @@ import (
"testing"
)
+func TestAppendUint(t *testing.T) {
+ testAppendUint(t, 0)
+ testAppendUint(t, 123)
+ testAppendUint(t, 0x7fffffff)
+}
+
func TestReadHexIntSuccess(t *testing.T) {
testReadHexIntSuccess(t, "0", 0)
testReadHexIntSuccess(t, "fF", 0xff)