The NUnit's Range Attribute allows specifying decreasing ranges of values, that is when from is greater that to.
However, to use a decreasing range of values, you must explicitly specify a negative step in the third argument. Another way to fix the problem is to swap the first and the second arguments so that the range becomes increasing.
[Test]publicvoidMyTest(// Incorrect range bounds. 'to' must be greater than or equal to 'from',// or there must be a negative step[Range(20,10)]int x){// do something}
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.