@@ -149,10 +149,10 @@ local({
149149 frac = frac + 0.1
150150 for (mult in c("all", "first", "last", "error")) {
151151 frac = frac + 0.01
152- test(21 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected) ## copy=TRUE: no shared columns
153- test(21 + (frac <- frac + 0.001), copied(ans, l))
154- test(21 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected) ## copy=FALSE: LHS shared but no RHS
155- test(21 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
152+ test(21 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected, context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) ) ## copy=TRUE: no shared columns
153+ test(21 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
154+ test(21 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected, context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) ) ## copy=FALSE: LHS shared but no RHS
155+ test(21 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-notcopied]", how, mult) )
156156 }
157157 }
158158})
@@ -174,13 +174,13 @@ local({
174174 frac = frac + 0.1
175175 for (mult in c("all", "first", "last", "error")) {
176176 frac = frac + 0.01
177- test(22 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
178- test(22 + (frac <- frac + 0.001), copied(ans, l))
179- test(22 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
177+ test(22 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
178+ test(22 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
179+ test(22 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
180180 if (how == "full") {
181- test(22 + (frac <- frac + 0.001), copied(ans, l))
181+ test(22 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
182182 } else {
183- test(22 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
183+ test(22 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
184184 }
185185 }
186186 }
@@ -203,13 +203,13 @@ local({
203203 frac = frac + 0.1
204204 for (mult in c("all", "first", "last", "error")) {
205205 frac = frac + 0.01
206- test(23 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
207- test(23 + (frac <- frac + 0.001), copied(ans, l))
208- test(23 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
206+ test(23 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
207+ test(23 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
208+ test(23 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
209209 if (how == "inner") {
210- test(23 + (frac <- frac + 0.001), copied(ans, l))
210+ test(23 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
211211 } else {
212- test(23 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
212+ test(23 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
213213 }
214214 }
215215 }
@@ -232,13 +232,13 @@ local({
232232 frac = frac + 0.1
233233 for (mult in c("all", "first", "last", "error")) {
234234 frac = frac + 0.01
235- test(24 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
236- test(24 + (frac <- frac + 0.001), copied(ans, l))
237- test(24 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
235+ test(24 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
236+ test(24 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
237+ test(24 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
238238 if (how %in% c("inner", "full")) {
239- test(24 + (frac <- frac + 0.001), copied(ans, l))
239+ test(24 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
240240 } else {
241- test(24 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
241+ test(24 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
242242 }
243243 }
244244 }
@@ -261,13 +261,13 @@ local({
261261 frac = frac + 0.1
262262 for (mult in c("all", "first", "last", "error")) {
263263 frac = frac + 0.01
264- test(25 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
265- test(25 + (frac <- frac + 0.001), copied(ans, l))
266- test(25 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
264+ test(25 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
265+ test(25 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
266+ test(25 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
267267 if (how %in% c("inner", "full")) {
268- test(25 + (frac <- frac + 0.001), copied(ans, l))
268+ test(25 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
269269 } else {
270- test(25 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
270+ test(25 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
271271 }
272272 }
273273 }
@@ -290,10 +290,10 @@ local({
290290 frac = frac + 0.1
291291 for (mult in c("all", "first", "last", "error")) {
292292 frac = frac + 0.01
293- test(26 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
294- test(26 + (frac <- frac + 0.001), copied(ans, l))
295- test(26 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
296- test(26 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
293+ test(26 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
294+ test(26 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
295+ test(26 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
296+ test(26 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-notcopied]", how, mult) )
297297 }
298298 }
299299})
@@ -315,10 +315,10 @@ local({
315315 frac = frac + 0.1
316316 for (mult in c("all", "first", "last", "error")) {
317317 frac = frac + 0.01
318- test(27 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
319- test(27 + (frac <- frac + 0.001), copied(ans, l))
320- test(27 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
321- test(27 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
318+ test(27 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
319+ test(27 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
320+ test(27 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
321+ test(27 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-notcopied]", how, mult) )
322322 }
323323 }
324324})
@@ -340,13 +340,13 @@ local({
340340 frac = frac + 0.1
341341 for (mult in c("all", "first", "last", "error")) {
342342 frac = frac + 0.01
343- test(28 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
344- test(28 + (frac <- frac + 0.001), copied(ans, l))
345- test(28 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
343+ test(28 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
344+ test(28 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
345+ test(28 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
346346 if (how == "inner") {
347- test(28 + (frac <- frac + 0.001), copied(ans, l))
347+ test(28 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
348348 } else {
349- test(28 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
349+ test(28 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-copiedness]", how, mult) )
350350 }
351351 }
352352 }
@@ -369,10 +369,10 @@ local({
369369 frac = frac + 0.1
370370 for (mult in c("all", "first", "last", "error")) {
371371 frac = frac + 0.01
372- test(29 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]])
373- test(29 + (frac <- frac + 0.001), copied(ans, l))
374- test(29 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]])
375- test(29 + (frac <- frac + 0.001), notcopied(ans, l, how=how))
372+ test(29 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=TRUE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=TRUE]", how, mult) )
373+ test(29 + (frac <- frac + 0.001), copied(ans, l), context=sprintf("how=%s, mult=%s [check-copied]", how, mult) )
374+ test(29 + (frac <- frac + 0.001), ans <- mergepair(l$lhs, l$rhs, on="id1", how=how, mult=mult, copy=FALSE), expected[[how]], context=sprintf("how=%s, mult=%s [copy=FALSE]", how, mult) )
375+ test(29 + (frac <- frac + 0.001), notcopied(ans, l, how=how), context=sprintf("how=%s, mult=%s [check-notcopied]", how, mult) )
376376 }
377377 }
378378})
@@ -974,9 +974,9 @@ local({
974974 for (mult in c("all", "first", "last", "error")) {
975975 frac = frac + 0.01
976976 if (is.null(expected[[how]][[mult]])) {
977- test(221 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
977+ test(221 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
978978 } else {
979- test(221 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
979+ test(221 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
980980 }
981981 }
982982 }
@@ -1017,9 +1017,9 @@ local({
10171017 for (mult in c("all", "first", "last", "error")) {
10181018 frac = frac + 0.01
10191019 if (is.null(expected[[how]][[mult]])) {
1020- test(222 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1020+ test(222 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
10211021 } else {
1022- test(222 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1022+ test(222 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
10231023 }
10241024 }
10251025 }
@@ -1060,9 +1060,9 @@ local({
10601060 for (mult in c("all", "first", "last", "error")) {
10611061 frac = frac + 0.01
10621062 if (is.null(expected[[how]][[mult]])) {
1063- test(223 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1063+ test(223 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
10641064 } else {
1065- test(223 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1065+ test(223 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
10661066 }
10671067 }
10681068 }
@@ -1103,9 +1103,9 @@ local({
11031103 for (mult in c("all", "first", "last", "error")) {
11041104 frac = frac + 0.01
11051105 if (is.null(expected[[how]][[mult]])) {
1106- test(224 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1106+ test(224 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
11071107 } else {
1108- test(224 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1108+ test(224 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
11091109 }
11101110 }
11111111 }
@@ -1146,9 +1146,9 @@ local({
11461146 for (mult in c("all", "first", "last", "error")) {
11471147 frac = frac + 0.01
11481148 if (is.null(expected[[how]][[mult]])) {
1149- test(225 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1149+ test(225 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
11501150 } else {
1151- test(225 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1151+ test(225 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
11521152 }
11531153 }
11541154 }
@@ -1189,9 +1189,9 @@ local({
11891189 for (mult in c("all", "first", "last", "error")) {
11901190 frac = frac + 0.01
11911191 if (is.null(expected[[how]][[mult]])) {
1192- test(226 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1192+ test(226 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
11931193 } else {
1194- test(226 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1194+ test(226 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
11951195 }
11961196 }
11971197 }
@@ -1232,9 +1232,9 @@ local({
12321232 for (mult in c("all", "first", "last", "error")) {
12331233 frac = frac + 0.01
12341234 if (is.null(expected[[how]][[mult]])) {
1235- test(227 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge")
1235+ test(227 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), error="multiple matches during merge", context=sprintf("how=%s, mult=%s", how, mult) )
12361236 } else {
1237- test(227 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]])
1237+ test(227 + (frac <- frac + 0.001), mergelist(l, on="id1", how=how, mult=mult), expected[[how]][[mult]], context=sprintf("how=%s, mult=%s", how, mult) )
12381238 }
12391239 }
12401240 }
0 commit comments