aboutsummaryrefslogtreecommitdiff
path: root/lib/bytes/bytes_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2018-11-30 09:07:44 +0700
committerShulhan <ms@kilabit.info>2018-11-30 09:07:44 +0700
commitb077d6796655e1be9864e0c64068bdcd5d1d2649 (patch)
tree8bb295669316e17553d19be1626a1658a986a3e6 /lib/bytes/bytes_test.go
parent2a1fb3d00e8472189b66ecc33c99f900f5b46ae8 (diff)
downloadpakakeh.go-b077d6796655e1be9864e0c64068bdcd5d1d2649.tar.xz
all: realigned some struct to minimize the size on memory
Diffstat (limited to 'lib/bytes/bytes_test.go')
-rw-r--r--lib/bytes/bytes_test.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/bytes/bytes_test.go b/lib/bytes/bytes_test.go
index e6e602d0..b8a24e27 100644
--- a/lib/bytes/bytes_test.go
+++ b/lib/bytes/bytes_test.go
@@ -11,12 +11,14 @@ func TestCutUntilToken(t *testing.T) {
line := []byte(`abc \def ghi`)
cases := []struct {
- token []byte
- startAt int
- checkEsc bool
- exp string
- expIdx int
+ token []byte
+ exp string
+
+ startAt int
+ expIdx int
+
expFound bool
+ checkEsc bool
}{{
exp: `abc \def ghi`,
expIdx: -1,
@@ -166,10 +168,12 @@ func TestSkipAfterToken(t *testing.T) {
line := []byte(`abc \def ghi`)
cases := []struct {
- token []byte
- startAt int
+ token []byte
+
+ startAt int
+ exp int
+
checkEsc bool
- exp int
expFound bool
}{{
token: []byte(`def`),