go-hep.org/x/hep@v0.38.1/groot/rbytes/rbytes_test.go (about) 1 // Copyright ©2020 The go-hep Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package rbytes 6 7 import "testing" 8 9 func TestStreamKind(t *testing.T) { 10 for _, tc := range []struct { 11 kind StreamKind 12 want string 13 }{ 14 { 15 kind: ObjectWise, 16 want: "object-wise", 17 }, 18 { 19 kind: MemberWise, 20 want: "member-wise", 21 }, 22 { 23 kind: 255, 24 want: "0xff", 25 }, 26 } { 27 t.Run(tc.want, func(t *testing.T) { 28 got := tc.kind.String() 29 if got != tc.want { 30 t.Fatalf("invalid kind: got=%q, want=%q", got, tc.want) 31 } 32 }) 33 } 34 }