← Back to team overview

nunit-core team mailing list archive

Re: [Bug 629496] [NEW] Extension of Range and Random

 

Nice ideas! Most will probably be moved to the 3.0 project.

Some implementation notes...

Range of DateTimes: Easy implementation, just like existing. All of these could
be generic in the future. In general, supporting a variety of types is a goal.

Range (Type, string, start, end) seems to stretch the notion of a range to mean
something else. It also requires the test code to be intimately
familiar with what
the source is about to return. So... not sure on this one.

I'd also like to add random strings matching certain specifications TBD.

If we move a way from a string name for sources, the signatures would
be changed accordingly.

@Rechenelf: Don't go overboard on tags! Launchpad has great search
capabilities, so finding "random" and "range" is quite easy. OTOH, tags
are great where some logical categorization or judgement is overlaid
on the bug list - e.g. feature, easy, gui. "Attribute" is a good one because
there would be too many false positives using a search.

Charlie


On Fri, Sep 3, 2010 at 6:19 AM, Rechenelf <629496@xxxxxxxxxxxxxxxxxx> wrote:
> Public bug reported:
>
> Having parameterized tests is a very nice feature. Some additional
> possibilities for the attributes are needed:
>
> Range with DateTime and Step as TimeSpan: Range (DateTime, DateTime, TimeSpan)
> Range (long, long) without Step (implicitly 1) - or does this make conflicts with Range (int, int)?
> unsigned variants
> Range (Type sourceType, string sourceName, int start, int end) might also be nice. Than it is easy to use the same data for multiple tests, if sourceName implements IList. (like ValueSourceAttribute)
> Range (string sourceName, int start, int end) see above
>
> Random for long and float
> unsigned variants
>
> ** Affects: nunitv2
>     Importance: Undecided
>         Status: New
>
>
> ** Tags: attribute feature random range
>
> --
> Extension of Range and Random
> https://bugs.launchpad.net/bugs/629496
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
>

-- 
Extension of Range and Random
https://bugs.launchpad.net/bugs/629496
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: New

Bug description:
Having parameterized tests is a very nice feature. Some additional possibilities for the attributes are needed:

Range with DateTime and Step as TimeSpan: Range (DateTime, DateTime, TimeSpan)
Range (long, long) without Step (implicitly 1) - or does this make conflicts with Range (int, int)?
unsigned variants
Range (Type sourceType, string sourceName, int start, int end) might also be nice. Than it is easy to use the same data for multiple tests, if sourceName implements IList. (like ValueSourceAttribute)
Range (string sourceName, int start, int end) see above

Random for long and float
unsigned variants





References