-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test in Coldfusion 11 #43
Comments
Successfully tested in Lucee 4.5.3 ! |
Good to know! |
I ran the unit tests on CF 11 and all passed. Aria Media Sagl +41 (0)91 600 9601 On Wed, Dec 16, 2015 at 9:14 PM, Russ [email protected] wrote:
|
@dnando Great! Now we just need to get the Travis CI stuff updated |
Russ, Running the unit tests on Lucee 4.5.2.018, I get a single error on Can't cast Complex Object Type Struct to String /Users/nando/sites/UnderscoreCF/mxunit_tests/functionsTest.cfc (28) Here's the test, with line 28 in italics. public void function testBind() { // TODO: once OO-style binding is ready bound = _.bind(func, {}, 'curly'); func = function(salutation, name) { return salutation & ': ' & name; }; func = _.bind(func, {}, 'hello'); var func2 = _.bind(func, {}, 'curly'); var func = function(salutation, firstname, lastname) { return salutation Aria Media Sagl +41 (0)91 600 9601 On Thu, Dec 17, 2015 at 8:23 PM, Russ [email protected] wrote:
|
Thanks for testing that out. Looks like that's the same error that Travis gets on the Railo 4.1+ and Lucee 4.5.1+. I remember trying to resolve this issue when it first occurred, but was unable to figure it out at the time. I should probably give it another shot! |
Hey, I think I might have figured out something related. Between JRE7 and JRE8 java changed the algorithm for iterating over HashMaps. In either case, you can't rely on the order of struct keys. It would appear that underscore, by using the for ... in syntax over a struct, is relying on the order of keys. In |
Ah, that makes sense. I can't think of a good way to resolve this yet, given that the behavior in UnderscoreJS relies on |
In Lucee 5 and prob in ACF12 you can specify ordered structs. -- Arthur On Thu, Sep 8, 2016 at 6:28 PM, Russ [email protected] wrote:
|
Instead of passing in arguments directly to hasher, I did If you always knew that you were going to be working with the arguments struct, you could just automatically assume that you can loop from 1 to structCount, appending from the array from object[n]. On Thu, Sep 8, 2016 at 6:38 PM, Arthur [email protected] wrote:
|
Alright, so it sounds like the high-level options are:
Not sure about which of these are viable or not, just providing a summary here. |
I would think to start with #2 until we see that performance is an issue? |
I'd open to any solution, really. We can always optimize later if necessary. |
Yeah, let's roll with that solution. |
#54 was submitted back in September, been waiting for someone to make the test cases pass for all of the engines |
Anyone who wants to do this, it would be much appreciated!
The text was updated successfully, but these errors were encountered: