Assert.Pass is treated as a test failure

Bug #742473 reported by Damyan Pepper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnitLite
Fix Released
High
Charlie Poole

Bug Description

If I my test case has something like this in it:

    Assert.Pass("All is well");

Then NUnitLite will treat this as a test failure.

I've attached a test case that I believe highlights this issue.

Related branches

Revision history for this message
Damyan Pepper (damyanp) wrote :
Revision history for this message
Damyan Pepper (damyanp) wrote :

Attached is what I think is a fix for this issue.

Note: in the original test case I checked that the stack trace was correct; I'm not convinced that was the right thing to do, so I've changed the test in this fix.

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 742473] [NEW] Assert.Pass is treated as a test failure

Yes, the Assert method and corresponding exception were added a while back but
no code to interpret the exception was added at the time. Since you're using it,
I'll get on the case and add both your tests and some implementation code.

BTW, the same is true for Assert.Inconclusive.

Charlie

On Fri, Mar 25, 2011 at 7:03 AM, Damyan Pepper
<email address hidden> wrote:
> Public bug reported:
>
> If I my test case has something like this in it:
>
>    Assert.Pass("All is well");
>
> Then NUnitLite will treat this as a test failure.
>
> I've attached a test case that I believe highlights this issue.
>
> ** Affects: nunitlite
>     Importance: Undecided
>         Status: New
>
> --
> You received this bug notification because you are a member of NUnitLite
> Developers, which is the registrant for NUnitLite.
> https://bugs.launchpad.net/bugs/742473
>
> Title:
>  Assert.Pass is treated as a test failure
>

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

Since you're actively using NUnitLite, I'll ask you here what I already posted on the nunit-discuss list...

Any problem with upgrading the build to use VS2008?

Charlie

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

Also did a partial fix for Assert.Ignore and Assert.Inconclusive. However, more work is needed since the current ResultState enumeration doesn't provide enough information.

Changed in nunitlite:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Charlie Poole (charlie.poole)
status: Triaged → Fix Committed
Revision history for this message
Damyan Pepper (damyanp) wrote : Re: [Bug 742473] Re: Assert.Pass is treated as a test failure

We're using VS2010 here, so the more modern the build the better for us :)
The version we actually reference into our project is built using nant.

On Thu, Mar 31, 2011 at 7:47 PM, Charlie Poole <email address hidden> wrote:

> Since you're actively using NUnitLite, I'll ask you here what I already
> posted on the nunit-discuss list...
>
> Any problem with upgrading the build to use VS2008?
>
> Charlie
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/742473
>
> Title:
> Assert.Pass is treated as a test failure
>
> Status in NUnitLite Testing Framework:
> New
>
> Bug description:
> If I my test case has something like this in it:
>
> Assert.Pass("All is well");
>
> Then NUnitLite will treat this as a test failure.
>
> I've attached a test case that I believe highlights this issue.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/nunitlite/+bug/742473/+subscribe
>

Changed in nunitlite:
milestone: none → 0.7
Changed in nunitlite:
status: Fix Committed → Fix Released
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.