Skip to content

Commit

Permalink
Merge pull request #220 from milosimpson/dupeSpecLinesBug
Browse files Browse the repository at this point in the history
Bug in duplicate spec line logic.
  • Loading branch information
Milo Simpson authored Jun 23, 2016
2 parents dcf544e + ff6c3f2 commit d986293
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public AmpPathElement( String key ) {
}
if ( literal.length() > 0 ) {
tok.add( literal.toString() );
canonicalBuilder.append( literal.toString() );
}

tok.trimToSize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public Object[][] getTestCaseUnits() {
{"objectToArray"},
{"passNullThru"},
{"passThru"},
{"pollaxman_218_duplicate_speclines_bug"},
{"prefixDataToArray"},
{"prefixedData"},
{"prefixSoupToBuckets"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"input" : {
"clone1_Physician" : "Physician_10000",
"clone2_Physician" : "Physician_10000",
"clone1_GCPerProIdenInfoPhyInfoStreet" : "Street",
"clone1_GCPerProIdenInfoPhyInfoAddLin2" : "Address1",
"clone1_GCPerProIdenInfoPhyInfoAddLin3" : "Address3",
"clone2_GCPerProIdenInfoPhyInfoStreet" : "Address1",
"clone2_GCPerProIdenInfoPhyInfoAddLin2" : "addresdd"
},
"spec" : {
// match clone1_Physician and clone2_Physician
"clone*_Physician" : {
// match the RHS of Physician_10000
"Physician_1000*" : {
// if we matched then grab the "number" of the physician and use that to process the address
"@(2,clone&(1,1)_GCPerProIdenInfoPhyInfoStreet)" : "Physician&(2,1).street",
"@(2,clone&(1,1)_GCPerProIdenInfoPhyInfoAddLin2)" : "Physician&(2,1).adderLin2",
"@(2,clone&(1,1)_GCPerProIdenInfoPhyInfoAddLin3)" : "Physician&(2,1).adderLin3"
}
}
},
"expected" : {
"Physician1" : {
"street" : "Street",
"adderLin2" : "Address1",
"adderLin3" : "Address3"
},
"Physician2" : {
"street" : "Address1",
"adderLin2" : "addresdd"
}
}
}

0 comments on commit d986293

Please sign in to comment.