[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35850] %!warning block does not clean warning
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #35850] %!warning block does not clean warning before test |
Date: |
Thu, 15 Mar 2012 15:05:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20120201 Iceweasel/3.5.16 (like Firefox/3.5.16) |
URL:
<http://savannah.gnu.org/bugs/?35850>
Summary: %!warning block does not clean warning before test
Project: GNU Octave
Submitted by: carandraug
Submitted on: Thu 15 Mar 2012 03:05:14 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.1
Operating System: Any
_______________________________________________________
Details:
Hi
the %!warning block for testing functions checks the actual last warning
instead of the warnings received by the function.
For example, given the following function:
function test_warning
endfunction
%!warning <something> test_warning
testing this function should fail. However, if the previous warning was
actually "something", testing this function will pass even though the function
didn't actual emit any warning.
I don't know if I'm clear enough so here's an example to replicate the bug.
Provided that the previous function is defined somewhere:
> test test_warning # this is as expected although for the wrong reason
***** warning <something> test_warning
!!!!! expected <something> but got X11 DISPLAY environment variable not set
> warning ("something")
warning: something
> test test_warning # the function doesn't actually emit the warning, this is
incorrect
PASSES 1 out of 1 tests
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35850>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #35850] %!warning block does not clean warning before test,
Carnë Draug <=