atara
11/14/2020, 10:03 PMfilter
can be the cause of slowing down. Do you also think that using bind
is the problem? Maybe I should try to avoid both and use arbitrary
instead of bind
?sam
11/14/2020, 10:04 PMatara
11/14/2020, 10:07 PMstring
for example and change them to pattern
to avoid lots of non relevant cases.sam
11/14/2020, 10:07 PMatara
11/14/2020, 10:07 PMbind
a lotatara
11/14/2020, 10:08 PMbind
? can I try the arbitrary
instead?sam
11/14/2020, 10:08 PMsam
11/14/2020, 10:08 PMsam
11/14/2020, 10:09 PMatara
11/14/2020, 10:09 PMsam
11/14/2020, 10:09 PMatara
11/14/2020, 10:10 PMsam
11/14/2020, 10:10 PMsam
11/14/2020, 10:10 PMatara
11/14/2020, 10:13 PMArb.bind(UserGen,
Arb.string().filterNot { it.contains('@') }
)
and imagine that the UserGen is another Arb that internally is built from other Arbs that are created by other bind
sam
11/14/2020, 10:14 PMsam
11/14/2020, 10:14 PMArb.bind(
UserGen,
Arb.string().filterNot { it.contains('@') }
).withEdgecases(emptyList())
sam
11/14/2020, 10:14 PMatara
11/14/2020, 10:14 PMatara
11/14/2020, 10:15 PMsam
11/14/2020, 10:16 PMatara
11/14/2020, 10:17 PMsam
11/14/2020, 10:17 PMsam
11/14/2020, 10:17 PMArb.bind(
UserGen,
Arb.string().filterNot { it.contains('@') }
).modifyEdgecases { it.take(10) }
atara
11/14/2020, 10:18 PMarbitrary
is it better than bind
sam
11/14/2020, 10:18 PMsam
11/14/2020, 10:18 PMatara
11/14/2020, 10:18 PMsam
11/14/2020, 10:18 PMAn [Arb] (for arbitrary) is a provider of property test data in two categories: edgecases and samples
sam
11/14/2020, 10:18 PMGenerators
are made up of Arb
and Exhaustive
sam
11/14/2020, 10:19 PMsam
11/14/2020, 10:19 PMsam
11/14/2020, 10:19 PM.modifyEdgecases { it.take(10) }
is already in the code basesam
11/14/2020, 10:20 PMfun <A> Arb<A>.limit() = this.modifyEdgecases { it.take(10) }
sam
11/14/2020, 10:20 PMArb.bind(
UserGen,
Arb.string().filterNot { it.contains('@') }
).limit()
sam
11/14/2020, 10:20 PMatara
11/14/2020, 10:21 PMatara
11/14/2020, 10:21 PMatara
11/14/2020, 10:23 PM.modifyEdgecases { it.shuffled().take(10) }
sam
11/14/2020, 10:26 PMatara
11/25/2020, 11:19 PMatara
11/25/2020, 11:20 PMsam
11/25/2020, 11:57 PMsam
11/25/2020, 11:58 PMatara
12/03/2020, 12:07 AM