diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/control/concatenative.lux | 442 |
1 files changed, 221 insertions, 221 deletions
diff --git a/stdlib/source/test/lux/control/concatenative.lux b/stdlib/source/test/lux/control/concatenative.lux index 8484cd1b8..1edbeccf4 100644 --- a/stdlib/source/test/lux/control/concatenative.lux +++ b/stdlib/source/test/lux/control/concatenative.lux @@ -25,70 +25,70 @@ [sample random.nat dummy random.nat] (`` (all _.and - (_.cover [/.push] - (n.= sample - (||> (/.push sample)))) - (_.cover [/.drop] - (n.= sample - (||> (/.push sample) - (/.push dummy) - /.drop))) - (_.cover [/.nip] - (n.= sample - (||> (/.push dummy) - (/.push sample) - /.nip))) - (_.cover [/.dup] - (||> (/.push sample) - /.dup - /.n/=)) - (_.cover [/.swap] - (n.= sample - (||> (/.push sample) - (/.push dummy) - /.swap))) - (_.cover [/.rotL] - (n.= sample - (||> (/.push sample) - (/.push dummy) - (/.push dummy) - /.rotL))) - (_.cover [/.rotR] - (n.= sample - (||> (/.push dummy) - (/.push sample) - (/.push dummy) - /.rotR))) - (_.cover [/.&&] - (let [[left right] (||> (/.push sample) - (/.push dummy) - /.&&)] - (and (n.= sample left) - (n.= dummy right)))) + (_.coverage [/.push] + (n.= sample + (||> (/.push sample)))) + (_.coverage [/.drop] + (n.= sample + (||> (/.push sample) + (/.push dummy) + /.drop))) + (_.coverage [/.nip] + (n.= sample + (||> (/.push dummy) + (/.push sample) + /.nip))) + (_.coverage [/.dup] + (||> (/.push sample) + /.dup + /.n/=)) + (_.coverage [/.swap] + (n.= sample + (||> (/.push sample) + (/.push dummy) + /.swap))) + (_.coverage [/.rotL] + (n.= sample + (||> (/.push sample) + (/.push dummy) + (/.push dummy) + /.rotL))) + (_.coverage [/.rotR] + (n.= sample + (||> (/.push dummy) + (/.push sample) + (/.push dummy) + /.rotR))) + (_.coverage [/.&&] + (let [[left right] (||> (/.push sample) + (/.push dummy) + /.&&)] + (and (n.= sample left) + (n.= dummy right)))) (~~ (template [<function> <tag>] - [(_.cover [<function>] - ((sum.equivalence n.= n.=) - {<tag> sample} - (||> (/.push sample) - <function>)))] + [(_.coverage [<function>] + ((sum.equivalence n.= n.=) + {<tag> sample} + (||> (/.push sample) + <function>)))] [/.||L .#Left] [/.||R .#Right])) - (_.cover [/.dip] - (n.= (++ sample) - (||> (/.push sample) - (/.push dummy) - (/.push (/.apply_1 ++)) - /.dip - /.drop))) - (_.cover [/.dip_2] - (n.= (++ sample) - (||> (/.push sample) - (/.push dummy) - (/.push dummy) - (/.push (/.apply_1 ++)) - /.dip_2 - /.drop /.drop))) + (_.coverage [/.dip] + (n.= (++ sample) + (||> (/.push sample) + (/.push dummy) + (/.push (/.apply_1 ++)) + /.dip + /.drop))) + (_.coverage [/.dip_2] + (n.= (++ sample) + (||> (/.push sample) + (/.push dummy) + (/.push dummy) + (/.push (/.apply_1 ++)) + /.dip_2 + /.drop /.drop))) )))) (template: (!numerical <=> <generator> <only> <arithmetic> <order>) @@ -100,19 +100,19 @@ subject <generator>] (`` (all _.and (~~ (template [<concatenative> <functional>] - [(_.cover [<concatenative>] - (<=> (<functional> parameter subject) - (||> (/.push subject) - (/.push parameter) - <concatenative>)))] + [(_.coverage [<concatenative>] + (<=> (<functional> parameter subject) + (||> (/.push subject) + (/.push parameter) + <concatenative>)))] <arithmetic>')) (~~ (template [<concatenative> <functional>] - [(_.cover [<concatenative>] - (bit#= (<functional> parameter subject) - (||> (/.push subject) - (/.push parameter) - <concatenative>)))] + [(_.coverage [<concatenative>] + (bit#= (<functional> parameter subject) + (||> (/.push subject) + (/.push parameter) + <concatenative>)))] <order>')) )))))]) @@ -146,153 +146,153 @@ |test| (is (/.=> [Nat] [Bit]) (/.apply_1 (|>> (n.- start) (n.< distance))))]] (all _.and - (_.cover [/.call /.apply_1] - (n.= (++ sample) - (||> (/.push sample) - (/.push (/.apply_1 ++)) - /.call))) - (_.cover [/.apply_2] - (n.= (n.+ sample sample) - (||> (/.push sample) - (/.push sample) - (/.push (/.apply_2 n.+)) - /.call))) - (_.cover [/.apply_3] - (n.= (all n.+ sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_3 (function (_ i0 i1 i2) - (all n.+ i0 i1 i2)))) - /.call))) - (_.cover [/.apply_4] - (n.= (all n.+ sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_4 (function (_ i0 i1 i2 i3) - (all n.+ i0 i1 i2 i3)))) - /.call))) - (_.cover [/.apply_5] - (n.= (all n.+ sample sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_5 (function (_ i0 i1 i2 i3 i4) - (all n.+ i0 i1 i2 i3 i4)))) - /.call))) - (_.cover [/.apply_6] - (n.= (all n.+ sample sample sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_6 (function (_ i0 i1 i2 i3 i4 i5) - (all n.+ i0 i1 i2 i3 i4 i5)))) - /.call))) - (_.cover [/.apply_7] - (n.= (all n.+ sample sample sample sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_7 (function (_ i0 i1 i2 i3 i4 i5 i6) - (all n.+ i0 i1 i2 i3 i4 i5 i6)))) - /.call))) - (_.cover [/.apply_8] - (n.= (all n.+ sample sample sample sample sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push (/.apply_8 (function (_ i0 i1 i2 i3 i4 i5 i6 i7) - (all n.+ i0 i1 i2 i3 i4 i5 i6 i7)))) - /.call))) - (_.cover [/.apply] - (n.= (all n.+ sample sample sample sample sample sample sample sample sample) - (||> (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push sample) - (/.push ((/.apply 9) (function (_ i0 i1 i2 i3 i4 i5 i6 i7 i8) - (all n.+ i0 i1 i2 i3 i4 i5 i6 i7 i8)))) - /.call))) - (_.cover [/.if] - (n.= (if choice - (++ sample) - (-- sample)) - (||> (/.push sample) - (/.push choice) - (/.push (/.apply_1 ++)) - (/.push (/.apply_1 --)) - /.if))) - (_.cover [/.loop] - (n.= (n.+ distance start) - (||> (/.push start) - (/.push (is (/.=> [Nat] [Nat Bit]) - (|>> |++| /.dup |test|))) - /.loop))) - (_.cover [/.while] - (n.= (n.+ distance start) - (||> (/.push start) - (/.push (is (/.=> [Nat] [Nat Bit]) - (|>> /.dup |test|))) - (/.push |++|) - /.while))) - (_.cover [/.do] - (n.= (++ sample) - (||> (/.push sample) - (/.push (is (/.=> [] [Bit]) - (|>> (/.push false)))) - (/.push |++|) - /.do /.while))) - (_.cover [/.compose] - (n.= (++ (++ sample)) - (||> (/.push sample) - (/.push |++|) - (/.push |++|) - /.compose - /.call))) - (_.cover [/.partial] - (n.= (n.+ sample sample) - (||> (/.push sample) - (/.push sample) - (/.push (/.apply_2 n.+)) - /.partial - /.call))) - (_.cover [/.when] - (n.= (if choice - (++ sample) - sample) - (||> (/.push sample) - (/.push choice) - (/.push (/.apply_1 ++)) - /.when))) - (_.cover [/.?] - (n.= (if choice - (++ sample) - (-- sample)) - (||> (/.push choice) - (/.push (++ sample)) - (/.push (-- sample)) - /.?))) + (_.coverage [/.call /.apply_1] + (n.= (++ sample) + (||> (/.push sample) + (/.push (/.apply_1 ++)) + /.call))) + (_.coverage [/.apply_2] + (n.= (n.+ sample sample) + (||> (/.push sample) + (/.push sample) + (/.push (/.apply_2 n.+)) + /.call))) + (_.coverage [/.apply_3] + (n.= (all n.+ sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_3 (function (_ i0 i1 i2) + (all n.+ i0 i1 i2)))) + /.call))) + (_.coverage [/.apply_4] + (n.= (all n.+ sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_4 (function (_ i0 i1 i2 i3) + (all n.+ i0 i1 i2 i3)))) + /.call))) + (_.coverage [/.apply_5] + (n.= (all n.+ sample sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_5 (function (_ i0 i1 i2 i3 i4) + (all n.+ i0 i1 i2 i3 i4)))) + /.call))) + (_.coverage [/.apply_6] + (n.= (all n.+ sample sample sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_6 (function (_ i0 i1 i2 i3 i4 i5) + (all n.+ i0 i1 i2 i3 i4 i5)))) + /.call))) + (_.coverage [/.apply_7] + (n.= (all n.+ sample sample sample sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_7 (function (_ i0 i1 i2 i3 i4 i5 i6) + (all n.+ i0 i1 i2 i3 i4 i5 i6)))) + /.call))) + (_.coverage [/.apply_8] + (n.= (all n.+ sample sample sample sample sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push (/.apply_8 (function (_ i0 i1 i2 i3 i4 i5 i6 i7) + (all n.+ i0 i1 i2 i3 i4 i5 i6 i7)))) + /.call))) + (_.coverage [/.apply] + (n.= (all n.+ sample sample sample sample sample sample sample sample sample) + (||> (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push sample) + (/.push ((/.apply 9) (function (_ i0 i1 i2 i3 i4 i5 i6 i7 i8) + (all n.+ i0 i1 i2 i3 i4 i5 i6 i7 i8)))) + /.call))) + (_.coverage [/.if] + (n.= (if choice + (++ sample) + (-- sample)) + (||> (/.push sample) + (/.push choice) + (/.push (/.apply_1 ++)) + (/.push (/.apply_1 --)) + /.if))) + (_.coverage [/.loop] + (n.= (n.+ distance start) + (||> (/.push start) + (/.push (is (/.=> [Nat] [Nat Bit]) + (|>> |++| /.dup |test|))) + /.loop))) + (_.coverage [/.while] + (n.= (n.+ distance start) + (||> (/.push start) + (/.push (is (/.=> [Nat] [Nat Bit]) + (|>> /.dup |test|))) + (/.push |++|) + /.while))) + (_.coverage [/.do] + (n.= (++ sample) + (||> (/.push sample) + (/.push (is (/.=> [] [Bit]) + (|>> (/.push false)))) + (/.push |++|) + /.do /.while))) + (_.coverage [/.compose] + (n.= (++ (++ sample)) + (||> (/.push sample) + (/.push |++|) + (/.push |++|) + /.compose + /.call))) + (_.coverage [/.partial] + (n.= (n.+ sample sample) + (||> (/.push sample) + (/.push sample) + (/.push (/.apply_2 n.+)) + /.partial + /.call))) + (_.coverage [/.when] + (n.= (if choice + (++ sample) + sample) + (||> (/.push sample) + (/.push choice) + (/.push (/.apply_1 ++)) + /.when))) + (_.coverage [/.?] + (n.= (if choice + (++ sample) + (-- sample)) + (||> (/.push choice) + (/.push (++ sample)) + (/.push (-- sample)) + /.?))) ))) (word: square @@ -305,10 +305,10 @@ Test (do random.monad [sample random.nat] - (_.cover [/.word: /.=> /.||>] - (n.= (n.* sample sample) - (||> (/.push sample) - ..square))))) + (_.coverage [/.word: /.=> /.||>] + (n.= (n.* sample sample) + (||> (/.push sample) + ..square))))) (def: .public test Test |