constraints from ConstraintExpression/ConstraintBuilder are not reusable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Fix Released
|
High
|
Charlie Poole | ||
NUnit V2 |
Fix Released
|
High
|
Charlie Poole |
Bug Description
Constraint that I receive from syntax helper (Is.Not.Null) is not reusable, but I guess this is more general problem.
I found this problem when upgrading nunit.framework.dll from v2.4.6 to v.2.5.3. In both cases tests were executed witn NUnit 2.5.3 console.
Worst thing about this problem seems that tests could actually pass when they should fail if you reuse constraint.
Here is simple example that demonstrates the problem:
using NUnit.Framework;
using NUnit.Framework
namespace NUnit_2_5_3_bug
{
[TestFixture]
public class FailToReuseCons
{
/// <summary>
/// Constraint from <see cref="Constrain
/// </summary>
/// <remarks>
/// Demonstrates that constraint received from syntax helper is not reusable.
/// </remarks>
[Test]
public void FromSyntaxHelper()
{
}
/// <summary>
/// How NUnit 2.4 did it (i think).
/// </summary>
[Test]
public void NotConstraint()
{
}
}
}
Changed in nunitv2: | |
status: | Triaged → In Progress |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
Changed in nunit-3.0: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: v2port |
Changed in nunit-3.0: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
status: | Triaged → Fix Committed |
milestone: | none → 2.9.5 |
Changed in nunit-3.0: | |
status: | Fix Committed → Fix Released |
Are constraints supposed to be "reused"? I have used NUnit for years and have never found that useful..