@@ -28,9 +28,7 @@ my @pss =
28
28
<c b c >. Bag , $ b ,
29
29
<B C C >. BagHash , $ bh ,
30
30
(about => e). Mix , $ m ,
31
- (minus => -e). Mix , $ m ,
32
31
(dosage => tau ). MixHash , $ mh ,
33
- (minus => -1 ). MixHash , $ mh ,
34
32
" factual" , $ map ,
35
33
" global" , $ hash ,
36
34
" ideas" , $ objh ,
@@ -44,10 +42,8 @@ my @pss =
44
42
<a b >. Bag , <a a b b c >. Mix , # .Bag -> .Mix
45
43
<a b >. Mix , <a a b b c >. Bag , # .Bag -> .Mix
46
44
47
- # negatives in Mix less than non-existing
48
- (a => -1 ). Mix , bag(),
49
- (a => -1 ). Mix , mix(),
50
- (a => -2 ). Mix , (a => -1 ). Mix ,
45
+ # negatives in Mix
46
+ mix(), (a => -1 ). Mix , # weight not important
51
47
52
48
# empties always proper subset of not-empties
53
49
set(), <a >. Set ,
@@ -98,16 +94,17 @@ my @notpss =
98
94
$ list ,
99
95
List . new ,
100
96
101
- (a => -1 ). Mix => set(), # set forces set semantics
102
- (a => 1 ). Mix => bag(), # positives in Mix with bag not proper subset
103
- (a => 1 ). Mix => mix(), # positives in Mix with mix not proper subset
104
- (a => -1 ). Mix => (a => -2 ). Mix , # right hand more negative
97
+ (a => 1 ). Mix => set(), # a not on right
98
+ (a => -1 ). Mix => set(), # a not on right
99
+ (a => 1 ). Mix => bag(), # a not on right
100
+ (a => -1 ). Mix => bag(), # a not on right
101
+ (a => 1 ). Mix => mix(), # a not on right
102
+ (a => -1 ). Mix => mix(), # a not on right
105
103
106
104
# non-empties never subset of empties
107
105
<a >. Set => set(),
108
106
<a >. Bag => bag(),
109
107
<a >. Mix => mix(),
110
- mix() => (a => -1 ). Mix , # not a proper subset because of negative weight
111
108
112
109
# various Map coercions that shouldn't be ok
113
110
{}, {},
@@ -132,23 +129,29 @@ for
132
129
& infix :< <R( >)>> , " R(>)" , & infix :<< R(<) >> , " R(<)"
133
130
-> & op , $ name , & rop , $ rname {
134
131
for @ pss -> $ left , $ right {
132
+ # exit dd $left, $name, $right, True unless
135
133
is-deeply op($ left ,$ right ), True ,
136
134
" $ left is $ name of $ right .^name()" ;
135
+ # exit dd $right, $rname, $left, True unless
137
136
is-deeply rop($ right ,$ left ), True ,
138
137
" $ right .^name() $ rname $ left" ;
139
138
}
140
139
for @ notpss {
141
140
if $ _ ~~ Pair {
141
+ # exit dd .key, $name, .value, False unless
142
142
is-deeply op(. key ,. value ), False ,
143
143
" $ _. value () is NOT $ name of $ _ .key.^name()" ;
144
+ # exit dd .value, $rname, .key, False unless
144
145
is-deeply rop(. value ,. key ), False ,
145
146
" $ _ .key.^name() NOT $ rname $ _. value ()" ;
146
147
}
147
148
148
149
# assume $marmoset
149
150
else {
151
+ # exit dd $marmoset, $name, $_, False unless
150
152
is-deeply op($ marmoset ,$ _ ), False ,
151
153
" marmoset is NOT $ name of $ _ .^name()" ;
154
+ # exit dd $_, $name, $marmoset, False unless
152
155
is-deeply rop($ _ ,$ marmoset ), False ,
153
156
" $ _ .^name() NOT $ rname marmoset" ;
154
157
}
@@ -165,23 +168,29 @@ for
165
168
& infix : <R⊅ >, " R⊅" , & infix : <R⊄ >, " R⊈"
166
169
-> & op , $ name , & rop , $ rname {
167
170
for @ pss -> $ left , $ right {
171
+ # exit dd $left, $name, $right, False unless
168
172
is-deeply op($ left ,$ right ), False ,
169
173
" $ left is NOT $ name of $ right .^name()" ;
174
+ # exit dd $right, $rname, $left, False unless
170
175
is-deeply rop($ right ,$ left ), False ,
171
176
" $ right .^name() NOT $ rname $ left" ;
172
177
}
173
178
for @ notpss {
174
179
if $ _ ~~ Pair {
180
+ # exit dd .key, $name, .value, True unless
175
181
is-deeply op(. key ,. value ), True ,
176
182
" $ _. value () is NOT $ name of $ _ .key.^name()" ;
183
+ # exit dd .value, $rname, .key, True unless
177
184
is-deeply rop(. value ,. key ), True ,
178
185
" $ _ .key.^name() NOT $ rname $ _. value ()" ;
179
186
}
180
187
181
188
# assume $marmoset
182
189
else {
190
+ # exit dd $marmoset, $name, $_, True unless
183
191
is-deeply op($ marmoset ,$ _ ), True ,
184
192
" marmoset is NOT $ name of $ _ .^name()" ;
193
+ # exit dd $_, $name, $marmoset, True unless
185
194
is-deeply rop($ _ ,$ marmoset ), True ,
186
195
" $ _ .^name() NOT $ rname marmoset" ;
187
196
}
0 commit comments