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

Side by Side Diff: common/cmpbin/common_test.go

Issue 1219323002: Rename funnybase and add more serializations. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: fixes 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 unified diff | Download patch
« no previous file with comments | « common/cmpbin/binary_vals_test.go ('k') | common/cmpbin/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 cmpbin
6
7 import (
8 "errors"
9 "flag"
10 "log"
11 "time"
12 )
13
14 var seed = flag.Int64("cmpbin.seed", time.Now().UnixNano(), "random seed for tes ting")
15
16 var randomTestSize = 1000
17
18 func init() {
19 flag.Parse()
20 log.Println("cmpbin.seed =", *seed)
21 }
22
23 type fakeWriter struct{ count int }
24
25 func (f *fakeWriter) WriteByte(byte) error {
26 if f.count == 0 {
27 return errors.New("nope")
28 }
29 f.count--
30 return nil
31 }
OLDNEW
« no previous file with comments | « common/cmpbin/binary_vals_test.go ('k') | common/cmpbin/doc.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698