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

Unified 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: don't need goconvey file Created 5 years, 6 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
Index: common/cmpbin/common_test.go
diff --git a/common/cmpbin/common_test.go b/common/cmpbin/common_test.go
new file mode 100644
index 0000000000000000000000000000000000000000..00c36df1b4202211b70ac12bf3e5664cb41c2c23
--- /dev/null
+++ b/common/cmpbin/common_test.go
@@ -0,0 +1,30 @@
+// 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 cmpbin
+
+import (
+ "flag"
+ "fmt"
+ "time"
+)
+
+var seed = flag.Int64("test.seed", time.Now().UnixNano(), "random seed for testing")
+
+var randomTestSize = 1000
+
+func init() {
+ flag.Parse()
+ fmt.Println("cmpbin.seed =", *seed)
M-A Ruel 2015/07/06 23:21:34 Please remove
iannucci 2015/07/07 00:03:27 This is to enable randomized test failures to be r
+}
+
+type fakeWriter struct{ count int }
+
+func (f *fakeWriter) WriteByte(byte) error {
+ if f.count == 0 {
+ return fmt.Errorf("nope")
+ }
+ f.count--
+ return nil
+}
« no previous file with comments | « common/cmpbin/binary_vals_test.go ('k') | common/cmpbin/doc.go » ('j') | common/cmpbin/doc.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698