[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61511] test.m reports incorrect value of %!sh
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #61511] test.m reports incorrect value of %!shared variables on test failure |
Date: |
Fri, 19 Nov 2021 19:40:22 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?61511>
Summary: test.m reports incorrect value of %!shared variables
on test failure
Project: GNU Octave
Submitted by: rik5
Submitted on: Fri 19 Nov 2021 04:40:20 PM PST
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Details:
The BIST test.m function in Octave incorrectly reports the value of shared
variables as they were before a failing test was executed, rather than their
actual value during the test that failed which could be germane.
Sample code attached as tst_report.m. Run "test tst_report.m" and observe
that the value for variable B is the initialized value from the start of the
file rather than the value that it actually holds during the %!test.
File tst_report.m:
%!shared A, B
%! B = magic (5);
%!test
%! B = diag ([1 2 3]);
%! assert (0);
%! #assert (1);
%!test
%! assert (0);
For further confirmation, comment out "assert (0);" in the first test and
uncomment "assert (1);". The second test will now execute and it will show
the correctly modified value of B.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 19 Nov 2021 04:40:21 PM PST Name: tst_report.m Size: 117B By:
rik5
<http://savannah.gnu.org/bugs/download.php?file_id=52302>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61511>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61511] test.m reports incorrect value of %!shared variables on test failure,
Rik <=