mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Use symbols for keys.
This commit is contained in:
parent
e85566bfeb
commit
63ffe0a596
@ -87,7 +87,7 @@ extension UnannotatedTerm: Arbitrary {
|
||||
}
|
||||
let keyed: Gen<Term> = Gen.sized { n in
|
||||
Gen<Int>.choose((0, n)).bind { n in
|
||||
sequence((0..<n).map { _ in String.arbitrary.bind { key in Gen.pure(()).bind { UnannotatedTerm.arbitrary }.fmap { (key, $0.term) } } }).fmap {
|
||||
sequence((0..<n).map { _ in symbol.bind { key in Gen.pure(()).bind { UnannotatedTerm.arbitrary }.fmap { (key, $0.term) } } }).fmap {
|
||||
Term((), .Keyed(Dictionary(elements: $0)))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user