X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a5ed26a2a1d01646ac511b925f56484be2e8819a..555c67a6126b88b592110b82bd96fed5cff5da31:/sdk/go/blockdigest/blockdigest_test.go diff --git a/sdk/go/blockdigest/blockdigest_test.go b/sdk/go/blockdigest/blockdigest_test.go index e520deefe8..9e8f9a4a0f 100644 --- a/sdk/go/blockdigest/blockdigest_test.go +++ b/sdk/go/blockdigest/blockdigest_test.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + package blockdigest import ( @@ -9,8 +13,8 @@ import ( func getStackTrace() string { buf := make([]byte, 1000) - bytes_written := runtime.Stack(buf, false) - return "Stack Trace:\n" + string(buf[:bytes_written]) + bytesWritten := runtime.Stack(buf, false) + return "Stack Trace:\n" + string(buf[:bytesWritten]) } func expectEqual(t *testing.T, actual interface{}, expected interface{}) { @@ -143,6 +147,9 @@ func TestLocatorPatternBasic(t *testing.T) { "12345678901234567890123456789012+12345+A1+B123wxyz@_-") expectLocatorPatternMatch(t, "12345678901234567890123456789012+12345+A1+B123wxyz@_-+C@") + expectLocatorPatternMatch(t, "12345678901234567890123456789012+12345+A") + expectLocatorPatternMatch(t, "12345678901234567890123456789012+12345+A1+B") + expectLocatorPatternMatch(t, "12345678901234567890123456789012+12345+A+B2") expectLocatorPatternFail(t, "12345678901234567890123456789012") expectLocatorPatternFail(t, "12345678901234567890123456789012+") @@ -153,11 +160,9 @@ func TestLocatorPatternBasic(t *testing.T) { expectLocatorPatternFail(t, "12345678901234567890123456789012+12345 ") expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+1") expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+1A") - expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+A") expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+a1") expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+A1+") - expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+A1+B") - expectLocatorPatternFail(t, "12345678901234567890123456789012+12345+A+B2") + } func TestParseBlockLocatorSimple(t *testing.T) {