Created
March 7, 2016 22:38
-
-
Save quii/a0240ef3c4c4a60d7616 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LatLong struct{ | |
Lat float64 | |
Long float64 | |
} | |
func (l LatLong) Generate(rand *rand.Rand, size int) reflect.Value{ | |
randomLatLong := LatLong{ | |
Lat: rand.Float64(), | |
Long: rand.Float64(), | |
} | |
return reflect.ValueOf(randomLatLong) | |
} | |
func TestLatLongIsAlwaysTrue(t *testing.T){ | |
assertion := func(x LatLong) bool { | |
t.Log("Random LatLong:", x) | |
//todo: Do some interesting assertions! | |
return true | |
} | |
if err := quick.Check(assertion, nil); err != nil { | |
t.Error(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment