bazel-test: add sizes to all tests.
This gets rid of the warning about mismatched test sizes.
This commit is contained in:
parent
bfc7fedbf9
commit
c1b8b72cf1
|
@ -9,11 +9,11 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "dbg_test",
|
||||
size = "small",
|
||||
srcs = ["dbg_test.go"],
|
||||
embed = [":dbg"],
|
||||
deps = [
|
||||
"//testio",
|
||||
"@com_github_stretchr_testify//require",
|
||||
],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -110,8 +110,8 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "lib_test",
|
||||
size = "small",
|
||||
srcs = ["lib_test.go"],
|
||||
embed = [":lib"],
|
||||
deps = ["//assert"],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -15,10 +15,10 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "logging_test",
|
||||
size = "small",
|
||||
srcs = [
|
||||
"example_test.go",
|
||||
"log_test.go",
|
||||
],
|
||||
embed = [":logging"],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -9,11 +9,11 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "mwc_test",
|
||||
size = "small",
|
||||
srcs = ["mwc_test.go"],
|
||||
embed = [":mwc"],
|
||||
deps = [
|
||||
"//assert",
|
||||
"//testio",
|
||||
],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "rand_test",
|
||||
size = "small",
|
||||
srcs = ["rand_test.go"],
|
||||
embed = [":rand"],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -9,8 +9,8 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "sbuf_test",
|
||||
size = "small",
|
||||
srcs = ["sbuf_test.go"],
|
||||
embed = [":sbuf"],
|
||||
deps = ["@org_golang_x_crypto//nacl/box"],
|
||||
size = "small",
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
||||
|
||||
go_library(
|
||||
name = "seekbuf",
|
||||
|
@ -6,3 +6,11 @@ go_library(
|
|||
importpath = "git.wntrmute.dev/kyle/goutils/seekbuf",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "seekbuf_test",
|
||||
srcs = ["seekbuf_test.go"],
|
||||
embed = [":seekbuf"],
|
||||
deps = ["//assert"],
|
||||
size = "small"
|
||||
)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// seekbuf implements a read-seekable buffer.
|
||||
package seekbuf
|
||||
|
||||
import "io"
|
||||
|
@ -40,7 +41,7 @@ func (b *Buffer) Seek(pos int) {
|
|||
|
||||
// Rewind resets the read pointer to 0.
|
||||
func (b *Buffer) Rewind() {
|
||||
b.pos = 0
|
||||
b.Seek(0)
|
||||
}
|
||||
|
||||
// Close clears all the data out of the buffer and sets the read position to 0.
|
||||
|
@ -49,3 +50,8 @@ func (b *Buffer) Close() error {
|
|||
b.pos = 0
|
||||
return nil
|
||||
}
|
||||
|
||||
// Len returns the length of data remaining to be read.
|
||||
func (b *Buffer) Len() int {
|
||||
return len(b.data[b.pos:])
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ go_library(
|
|||
|
||||
go_test(
|
||||
name = "testio_test",
|
||||
size = "small",
|
||||
srcs = ["testio_test.go"],
|
||||
embed = [":testio"],
|
||||
size = "small",
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue