Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: go/src/infra/libs/clock/systemtimer_test.go

Issue 1223213002: Remove libs/clock in favor of luci-go/common/clock. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@abstract
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/libs/clock/systemtimer.go ('k') | go/src/infra/libs/clock/testclock/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/libs/clock/systemtimer_test.go
diff --git a/go/src/infra/libs/clock/systemtimer_test.go b/go/src/infra/libs/clock/systemtimer_test.go
deleted file mode 100644
index 4ab9dfb6dc06f58205dcceec7de72873a7362f65..0000000000000000000000000000000000000000
--- a/go/src/infra/libs/clock/systemtimer_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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"
- "time"
-
- . "github.com/smartystreets/goconvey/convey"
-)
-
-func TestSystemTimer(t *testing.T) {
- t.Parallel()
-
- Convey(`A systemTimer instance`, t, func() {
- t := new(systemTimer)
-
- Convey(`Should start with a nil channel.`, func() {
- So(t.GetC(), ShouldBeNil)
- })
-
- Convey(`When stopped, should return inactive.`, func() {
- So(t.Stop(), ShouldBeFalse)
- })
-
- Convey(`When reset`, func() {
- active := t.Reset(1 * time.Hour)
- So(active, ShouldBeFalse)
-
- Convey(`When reset to a short duration`, func() {
- active := t.Reset(1 * time.Microsecond)
-
- Convey(`Should return active.`, func() {
- So(active, ShouldBeTrue)
- })
-
- Convey(`Should trigger shortly.`, func() {
- tm := <-t.GetC()
- So(tm, ShouldNotResemble, time.Time{})
- })
- })
-
- Convey(`When stopped, should return active and have a non-nil C.`, func() {
- active := t.Stop()
- So(active, ShouldBeTrue)
- So(t.GetC(), ShouldNotBeNil)
- })
-
- Convey(`When stopped, should return active.`, func() {
- active := t.Stop()
- So(active, ShouldBeTrue)
- })
-
- Convey(`Should have a non-nil channel.`, func() {
- So(t.GetC(), ShouldNotBeNil)
- })
-
- Reset(func() {
- t.Stop()
- })
- })
- })
-}
« no previous file with comments | « go/src/infra/libs/clock/systemtimer.go ('k') | go/src/infra/libs/clock/testclock/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698