Skip to content

Commit d8dbe57

Browse files
aykevldeadprogram
authored andcommitted
testing: implement some benchmark stubs
This allows the following packages to pass tests: * crypto/des * encoding/hex I have not included crypto/rc4 as it doesn't pass tests on Go 1.11 (but it works on later versions).
1 parent c2bfe6b commit d8dbe57

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ tinygo-test:
198198
$(TINYGO) test container/heap
199199
$(TINYGO) test container/list
200200
$(TINYGO) test container/ring
201+
$(TINYGO) test crypto/des
201202
$(TINYGO) test encoding/ascii85
203+
$(TINYGO) test encoding/hex
202204
$(TINYGO) test math
203205
$(TINYGO) test text/scanner
204206
$(TINYGO) test unicode/utf8

src/testing/benchmark.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,15 @@ type InternalBenchmark struct {
2020
Name string
2121
F func(b *B)
2222
}
23+
24+
func (b *B) SetBytes(n int64) {
25+
panic("testing: unimplemented: B.SetBytes")
26+
}
27+
28+
func (b *B) ResetTimer() {
29+
panic("testing: unimplemented: B.ResetTimer")
30+
}
31+
32+
func (b *B) Run(name string, f func(b *B)) bool {
33+
panic("testing: unimplemented: B.Run")
34+
}

0 commit comments

Comments
 (0)