Issue with Expected result when running NUnit 2.5.10 tests under 2.6

Bug #935952 reported by Charlie Poole
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Critical
Charlie Poole

Bug Description

The following test

[TestCase(1, 2, Result = 3)]
[TestCase(3, 4, Result = 7)]
[TestCase(5, 6, Result = 11)]
public int Add_Test(int a, int b)
{
    return a + b;
}

results in 3 non-runnable tests with the message "Method has non-void return value" when the test references NUnit 2.5.10 (or earlier) and it is run using the 2.6 gui or console runner.

This is the result of a change in 2.6 affecting compatibility.

Tags: framework

Related branches

Changed in nunitv2:
status: Triaged → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
Revision history for this message
Victor Kropp (kropp) wrote :

NUnit 2.6.1-rc still shows "Method has non-void return value" message if Result = null

Revision history for this message
Charlie Poole (charlie.poole) wrote :

It's not possible to specify a null result in a pre-2.6 version of the framework. This bug was fixed in 2.6 by adding a separate property to the attribute indicating that the expected result should be used. NUnit 2.6 running tests referencing an earlier framework continue to display this bug because it's a bug in the framework assembly itself.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.