Re: [elm-discuss] Elm Test building custom generators

2016-10-17 Thread Zachary Kessin
Yes I did

Zach
ᐧ

On Mon, Oct 17, 2016 at 2:31 AM, Max Goldstein 
wrote:

> Fuzz.map4, which I think was only added in 2.1.0 so that's why Zachary
> didn't see it in August.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Zach Kessin
SquareTarget 
Twitter: @zkessin 
Skype: zachkessin

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Elm Test building custom generators

2016-10-16 Thread Max Goldstein
Fuzz.map4, which I think was only added in 2.1.0 so that's why Zachary didn't 
see it in August. 

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [elm-discuss] Elm Test building custom generators

2016-10-16 Thread John Orford
Zach, did you find an answer for this in the end?

On Sun, 28 Aug 2016 at 11:52 Zachary Kessin  wrote:

> I am banging my head against the elm-test fuzzer API.
>
> I have a record like this
>
>
> type alias Location =
> { id : String
> , latitude : Float
> , longitude : Float
> , name : String
> }
>
> That I wish to create a fuzzer for, my first thought was to do something
> like this
>
>
>
> locationFuzzer : Fuzzer Location
> locationFuzzer =
>  Fuzz.custom
> (Random.map4 Location string.generator
>  (Random.float -90 90)
>  (Random.float -180 180)
>   string.generator)
> (\{id, latitude,longitude , name }
> -> Shrink.map Location
>(Shrink.string id)
>`Shrink.andMap`(Shrink.float latitude)
>
>`Shrink.andMap` (Shrink.float longitude)
>`Shrink.andMap` (Shrink.string name)
>)
>
> But that is not right, is there a good way to create custom fuzzers for
> complex data, it really should be pretty easy I would think
>
> Zach
>
> --
> Zach Kessin
> SquareTarget 
> Twitter: @zkessin 
> Skype: zachkessin
> ᐧ
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.