When comparing two equal, complex structures, the assertion sometimes returns false depending on how those structures get serialized.
By "complex" structure, I mean one with nested structures and arrays, i.e.
I believe the problem lies in the way in which TestBox is serializing the structures, i.e.
This will only create a predictable order of keys for the top level of keys - any nested structures and arrays are still native CFML structures.
The following reproduces the error for me. The key was creating a struct of type "linked" with StructNew( "linked" ):
the "linked" portion is a railo only feature. so is the problem only with a linked hash map or with normal nested structs in adobe as well. I am not sure anymore on this ticket.
Note the same value, different type. This is a meaningful difference in Java, but not in CFML.
The linked struct was the only way I could get a reproducable test case quickly. I don't think that really matter here though. The point is that the approach is trying to normalize the serialization of the structure but is only doing that at the top level. I recall also having problems when comparing an arguments scope with a structure in this way. I think a comparison that traverses the structure is unavoidable to prevent further oddities.