[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56935] assert could produce more meaningful o
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56935] assert could produce more meaningful outputs for structs |
Date: |
Mon, 23 Sep 2019 13:49:04 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<https://savannah.gnu.org/bugs/?56935>
Summary: assert could produce more meaningful outputs for
structs
Project: GNU Octave
Submitted by: rik5
Submitted on: Mon 23 Sep 2019 10:49:02 AM PDT
Category: Octave Function
Severity: 1 - Wish
Priority: 5 - Normal
Item Group: Feature Request
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
When assert compares two structs that differ it is difficult to determine to
which field the differences belong. Example script tst_assert.m
x = struct ("a", 1, "b", 2, "c", 3);
y = struct ("a", 1, "b", 3, "c", 4);
assert (x,y)
And when it is run
octave:1> tst_assert
error: ASSERT errors for: assert (cond {i},expected {i},tol)
Location | Observed | Expected | Reason
() 2 3 Abs err 1 exceeds tol 0 by 1
ASSERT errors for: assert (cond {i},expected {i},tol)
Location | Observed | Expected | Reason
() 3 4 Abs err 1 exceeds tol 0 by 1
It would be nice if assert could report something about where the difference
lies such as
error: ASSERT errors for: assert (y.b (observed), x.b (expected), tol)
or something similar.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 23 Sep 2019 10:49:02 AM PDT Name: tst_assert.m Size: 87B By:
rik5
<http://savannah.gnu.org/bugs/download.php?file_id=47564>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56935>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #56935] assert could produce more meaningful outputs for structs,
Rik <=