[Testsuite] random shuffle moveable issue

Christopher Jefferson chris@bubblescope.net
Sat Sep 26 22:15:00 GMT 2015


On 25 September 2015 at 22:20, Aurelio Remonda
<aurelio.remonda@tallertechnologies.com> wrote:
>
> El sep 25, 2015 2:12 PM, "Christopher Jefferson" <chris@bubblescope.net>
> escribió:
>>
>> I assume this means that the board is failing to handle a global
>> variable of int[200000] correctly?
>
>> How small do you have to make the array to make the test pass? The
>> algorithm isn't testing anything specific with an array that big,
>> certainly I imagine 10,000 would be more than enough to get the same
>> quality of test coverage (probably even 100 to be honest, but bigger
>> doesn't hurt).
>
> Christopher thank you for your reply!
>
> You can easily make its size of around 30000 so if 10000 is more than enough
> it can
>
> be done!
>
> I have a question about the code if you don't mind. Why in the test02 the
> fill_ascending()
>
> call is needed? If i understood it correctly the random_shuffle is made on
> rv[ ] and then
>
> it is compared with result [ ]. Am i correct? :)

Yes, that call is pointless. Also, to be honest the test seems a
little sloppy in general -- no real need to make that A a global
variable (although, not clear how much value there is in cleaning
everything up either).

Chris


>
>
>
>
>



More information about the Libstdc++ mailing list