Closed atuttle closed 11 years ago
it could be a CF bug, considering i've been testing CF 10 on Windows exclusively
I'm starting to wonder if it could be an issue with MXUnit. I just dropped this into the root of my underscore folder as test.cfm, and everything looks fine, including the _.range(10)
:
<cfscript>
_ = new underscore();
fail = _.range(10);
writeDump(var=fail, label="_.range(10)");
customRange = [];
start = 0;
step = 1;
i = 1;
while (i <= 10){
customRange[i] = start;
start += step;
i++;
}
writeDump(var=customRange, label="custom while loop with i++ moved OUT of assignment");
customRange = [];
start = 0;
step = 1;
for (i = 1; i <= 10; i++){
customRange[i] = start;
start += step;
}
writeDump(var=customRange, label="for loop");
</cfscript>
All 3 dumps look identical, and seem to be regular integers.
I also added a debug(result)
to the corresponding test and see the exact same result. I'm thinking it must be something inside MXUnit that's doing a strange compare.
Dammit. False alarm. Must have been a bug in MXUnit that's since been fixed. I grabbed the latest version of MXUnit and all tests are passing now. Sorry. :unamused:
aw, i was kinda looking forward to fixing some bugs too.
I initially had trouble as of CF10 update 5, but have since rolled back to every previous update level and confirmed that the issue remains for all of them. I'm starting to think it may be a bug in CF, and if further testing proves that to be true I'll be contacting the CF engineering team.
The issue I'm seeing is that several tests are failing with similar results to:
The following tests are all exhibiting this behavior for me (OSX 10.7.5, Apache 2.2):
I even tried adding a
fix()
where appropriate, but it had no effect whatsoever.