| Index: common/clock/tags_test.go
|
| diff --git a/common/clock/tags_test.go b/common/clock/tags_test.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..89ce227622a262c498a200805e70d99d98c97d6b
|
| --- /dev/null
|
| +++ b/common/clock/tags_test.go
|
| @@ -0,0 +1,39 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package clock
|
| +
|
| +import (
|
| + "testing"
|
| +
|
| + "golang.org/x/net/context"
|
| +
|
| + . "github.com/smartystreets/goconvey/convey"
|
| +)
|
| +
|
| +func TestTags(t *testing.T) {
|
| + Convey(`An empty Context`, t, func() {
|
| + c := context.Background()
|
| +
|
| + Convey(`Should have nil tags.`, func() {
|
| + So(Tags(c), ShouldBeNil)
|
| + })
|
| +
|
| + Convey(`With tag, "A"`, func() {
|
| + c = Tag(c, "A")
|
| +
|
| + Convey(`Should have tags {"A"}.`, func() {
|
| + So(Tags(c), ShouldResemble, []string{"A"})
|
| + })
|
| +
|
| + Convey(`And another tag, "B"`, func() {
|
| + c = Tag(c, "B")
|
| +
|
| + Convey(`Should have tags {"A", "B"}.`, func() {
|
| + So(Tags(c), ShouldResemble, []string{"A", "B"})
|
| + })
|
| + })
|
| + })
|
| + })
|
| +}
|
|
|