Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
CollectionTest.testSortEmptyAr ray fails
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Chris Blackwell  
View profile  
 More options Jan 20, 5:33 am
From: Chris Blackwell <ch...@team193.com>
Date: Fri, 20 Jan 2012 02:33:34 -0800 (PST)
Local: Fri, Jan 20 2012 5:33 am
Subject: CollectionTest.testSortEmptyArray fails
Not sure if this is a recent change in mxunit, but
unittests.util.CollectionTest.testSortEmptyArray fails with the
message

from Assert.cfc@416
"Cannot compare array references in ColdFusion
Arrays in ColdFusion are passed by value. To compare instances, you
may wrap the array in a struct and compare those."

Doing as suggested and wrapping the arrays in a struct allows the test
to pass.

diff --git a/unittests/util/CollectionTest.cfc b/unittests/util/
CollectionTest.cfc
index 5046952..342070a 100644
--- a/unittests/util/CollectionTest.cfc
+++ b/unittests/util/CollectionTest.cfc
@@ -209,8 +209,8 @@

                assertTrue(arrayIsEmpty(local.sorted.getCollection()));

-               assertNotSame(local.collection, local.sorted);
-               assertNotSame(local.collection.getCollection(),
local.sorted.getCollection());
+               assertNotSame({value=local.collection}, {value=local.sorted});
+               assertNotSame({value=local.collection.getCollection()},
{value=local.sorted.getCollection()});
        </cfscript>
 </cffunction>

I ran the tests on railo-express 3.3.1.010, but this doesn't appear to
be engine specific

Cheers, Chris


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jan 20, 6:02 am
From: Mark Mandel <mark.man...@gmail.com>
Date: Fri, 20 Jan 2012 22:02:29 +1100
Local: Fri, Jan 20 2012 6:02 am
Subject: Re: [coldspring-users] CollectionTest.testSortEmptyArray fails

Actually, thanks for reminding me - I have to set up a pull request to
mxunit to get rid of that restriction.

I have it locally (hence my tests passing).

Mark

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Blackwell  
View profile  
 More options Jan 20, 6:19 am
From: Chris Blackwell <ch...@team193.com>
Date: Fri, 20 Jan 2012 03:19:46 -0800 (PST)
Local: Fri, Jan 20 2012 6:19 am
Subject: Re: CollectionTest.testSortEmptyArray fails
Just out of curiosity, what've you changed in mxunit to allow this?
array's are still passed by value right?

On Jan 20, 11:02 am, Mark Mandel <mark.man...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Mandel  
View profile  
 More options Jan 20, 6:24 am
From: Mark Mandel <mark.man...@gmail.com>
Date: Fri, 20 Jan 2012 22:24:09 +1100
Local: Fri, Jan 20 2012 6:24 am
Subject: Re: [coldspring-users] Re: CollectionTest.testSortEmptyArray fails

Not if they are native Java ArrayLists, like I'm using in the test :)

There is my pull request on MXUnit.
https://github.com/mxunit/mxunit/pull/17

Mark

--
E: mark.man...@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast
http://www.2ddu.com/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »