History

Try to make examples appear on godoc again

Gregory Petrosyan committed 6 years ago

Commit 7d60fe71 parent a2264963 files · +6 −16Browse files

Showing the changes to example_function_test.go (1 of 3 files). Show all

Unified · Split

example_function_test.go+3−2
@@ -42,8 +42,9 @@ func ParseDate(s string) (int, int, int, error) { · 41 unmodified lines
42 return y, m, d, nil42 return y, m, d, nil
43}43}
44 44
45// Rename to TestParseDate to make an actual (failing) test.45// Rename to TestParseDate(t *testing.T) to make an actual (failing) test.
46func ExampleCheck_parseDate(t *testing.T) {46func ExampleCheck_parseDate() {
47 var t *testing.T
47 rapid.Check(t, func(t *rapid.T) {48 rapid.Check(t, func(t *rapid.T) {
48 y := rapid.IntRange(0, 9999).Draw(t, "y").(int)49 y := rapid.IntRange(0, 9999).Draw(t, "y").(int)
49 m := rapid.IntRange(1, 12).Draw(t, "m").(int)50 m := rapid.IntRange(1, 12).Draw(t, "m").(int)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t