From c84feab7922d8090fa232e41ccc9efbff19eda1c Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Tue, 19 Aug 2014 11:12:35 +0200 Subject: [PATCH] Added copyright header and more test cases for key encoder/decoder. --- common/coords_test.go | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/common/coords_test.go b/common/coords_test.go index 9ff5f4a..05dd93f 100644 --- a/common/coords_test.go +++ b/common/coords_test.go @@ -1,3 +1,7 @@ +// Copyright 2014 by Sascha L. Teichmann +// Use of this source code is governed by the MIT license +// that can be found in the LICENSE file. + package common import "testing" @@ -45,18 +49,32 @@ func checkEncodeDecode( func TestEncodeDecode(t *testing.T) { allData(func(c Coord) { checkEncodeDecode( - "Big endian", + "Big endian - interleaved", CoordToInterleaved, EncodeToBigEndian, DecodeFromBigEndian, c, t) }) allData(func(c Coord) { checkEncodeDecode( - "String", + "String - interleaved", CoordToInterleaved, EncodeStringToBytes, DecodeStringFromBytes, c, t) }) + allData(func(c Coord) { + checkEncodeDecode( + "Big endian - plain", + CoordToPlain, + EncodeToBigEndian, DecodeFromBigEndian, + c, t) + }) + allData(func(c Coord) { + checkEncodeDecode( + "String - plain", + CoordToPlain, + EncodeStringToBytes, DecodeStringFromBytes, + c, t) + }) } func checkJoinSplit(