Skip to content

Commit

Permalink
lcasing the listcompare for struct comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
marcesher committed Oct 31, 2011
1 parent 18c994b commit 1dd2098
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions framework/DataCompare.cfc
Expand Up @@ -202,8 +202,8 @@
<cfargument name="delim2" type="string" required="false" default="," />
<cfargument name="delim3" type="string" required="false" default="," />

<cfset var list1Array = ListToArray(arguments.List1,Delim1) />
<cfset var list2Array = ListToArray(arguments.List2,Delim2) />
<cfset var list1Array = ListToArray(lCase(arguments.List1),Delim1) />
<cfset var list2Array = ListToArray(lcase(arguments.List2),Delim2) />

<!--- Remove the subset List2 from List1 to get the diff --->
<cfset list1Array.removeAll(list2Array) />
Expand Down
10 changes: 5 additions & 5 deletions tests/framework/AssertTest.cfc
Expand Up @@ -388,7 +388,7 @@
<cfset var nested = {one=1, 2="two" }>
<cfset var struct1 = { one="one", two="two", three="3", nested = nested }>
<cfset var struct2 = duplicate( struct1 )>
<cfset assertStructEquals( struct1, struct2 )>
<cfset assertEquals( struct1, struct2 )>
</cffunction>

<cffunction name="assertStructEquals_fails_for_mismatching_simple_structs" returntype="void">
Expand All @@ -399,7 +399,7 @@
<cfset struct2.nested["2"] = "two">

<cftry>
<cfset assertStructEquals( struct1, struct2 )>
<cfset assertEquals( struct1, struct2 )>
<cfcatch type="mxunit.exception.AssertionFailedError">
<!--- we want this failure --->
<cfset debug(cfcatch)>
Expand All @@ -414,7 +414,7 @@
<cfset struct2.nested.one = "one">

<cftry>
<cfset assertStructEquals( struct1, struct2 )>
<cfset assertEquals( struct1, struct2 )>
<cfcatch type="mxunit.exception.AssertionFailedError">
<!--- we want this failure --->
<cfset debug(cfcatch)>
Expand Down Expand Up @@ -442,7 +442,7 @@ col4,col2,col3,col1
3.4|3.2|3.3|3
</cf_querysim>

<cfset assertQueryEquals( q1, q2, "These queries should have been equal even though they were created with columns in a different order")>
<cfset assertEquals( q1, q2, "These queries should have been equal even though they were created with columns in a different order")>

</cffunction>

Expand All @@ -469,7 +469,7 @@ col1,col2,col3,col4


<cftry>
<cfset assertQueryEquals( q1, q2, "These queries should have been equal even though they were created with columns in a different order")>
<cfset assertEquals( q1, q2, "These queries should have been equal even though they were created with columns in a different order")>

<cfcatch type="mxunit.exception.AssertionFailedError" >
<!--- we want this failure --->
Expand Down

0 comments on commit 1dd2098

Please sign in to comment.