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