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

Side by Side Diff: common/meter/config_test.go

Issue 1679023005: Add Context cancellation to clock. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Actually upload the patch. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « common/meter/config.go ('k') | common/meter/doc.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package meter
6
7 import (
8 "testing"
9 "time"
10
11 . "github.com/smartystreets/goconvey/convey"
12 )
13
14 func TestConfig(t *testing.T) {
15 Convey(`An zero (unmetered) config instance`, t, func() {
16 cfg := new(Config)
17
18 Convey(`It will register as unconstained.`, func() {
19 So(cfg.HasFlushConstraints(), ShouldBeFalse)
20 })
21 })
22
23 Convey(`A configured config instance`, t, func() {
24 cfg := &Config{
25 Count: 10,
26 Delay: 1 * time.Second,
27 }
28
29 Convey(`Will register as metered.`, func() {
30 So(cfg.HasFlushConstraints(), ShouldBeTrue)
31 })
32 })
33 }
OLDNEW
« no previous file with comments | « common/meter/config.go ('k') | common/meter/doc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698