bugGNU Octave - Bugs: bug #55539, "format long" breaks...

 
 

bug #55539: "format long" breaks corefcn/pr-output.cc-tst test

Submitter:  Andrew Janke <apjanke>
Submitted:  Mon 21 Jan 2019 07:56:16 PM UTC
   
 
Category:  Test Suite Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.0.1 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 21 Jan 2019 10:24:01 PM UTC, comment #4: 

I can confirm this fixed it for me.

Andrew Janke <apjanke>
Mon 21 Jan 2019 09:29:05 PM UTC, comment #3: 

Fixed all affected tests on the stable branch

https://hg.savannah.gnu.org/hgweb/octave/rev/d673b506f382

Mike Miller <mtmiller>
Group Member
Mon 21 Jan 2019 08:03:41 PM UTC, comment #2: 

Confirmed, should be fixed on stable for 5 release.

The two tests that fail are for 'evalc', and both rely on the default 'short' format state:


>>>>> processing libinterp/corefcn/pr-output.cc-tst
***** test
 str = evalc ("x = 1.1; display (x)");
 assert (str, "x =  1.1000\n");
!!!!! test failed
ASSERT errors for:  assert (str,"x =  1.1000\n")

  Location  |  Observed  |  Expected  |  Reason
     []      x =  1.100000000000000
 x =  1.1000
   Strings don't match
***** test
 str = evalc ("display (1.1)");
 assert (str, " 1.1000\n");
!!!!! test failed
ASSERT errors for:  assert (str," 1.1000\n")

  Location  |  Observed  |  Expected  |  Reason
     []       1.100000000000000
    1.1000
     Strings don't match


Mike Miller <mtmiller>
Group Member
Mon 21 Jan 2019 08:02:46 PM UTC, comment #1: 

Same for libinterp/parse-tree/oct-parse.yy-tst:


>> runsometests('libinterp/parse-tree/oct-parse.yy-tst')
Testing /usr/local/Cellar/octave-stable/stable/share/octave/5.0.1/etc/tests/libinterp/parse-tree/oct-parse.yy-tst
PASSES 24 out of 24 tests
>> format long
>> clear classes
>> runsometests('libinterp/parse-tree/oct-parse.yy-tst')
Testing /usr/local/Cellar/octave-stable/stable/share/octave/5.0.1/etc/tests/libinterp/parse-tree/oct-parse.yy-tst
***** test
 [s, a, b] = evalc ("__f_evalc ()");
 assert (s, "foobar 3.1416\n");
 assert (a, 1);
 assert (b, 2);
!!!!! test failed
ASSERT errors for:  assert (s,"foobar 3.1416\n")

  Location  |  Observed  |  Expected  |  Reason
     []      foobar 3.141592653589793
 foobar 3.1416
   Strings don't match
shared variables   scalar structure containing the fields:

    x =  1


Andrew Janke <apjanke>
Mon 21 Jan 2019 07:56:16 PM UTC, original submission:  

If I set "format long" before running the test suite, then test libinterp/corefcn/pr-output.cc-tst fails.


>> runsometests('libinterp/corefcn/pr-output.cc-tst')
Testing /usr/local/Cellar/octave-stable/stable/share/octave/5.0.1/etc/tests/libinterp/corefcn/pr-output.cc-tst
PASSES 16 out of 16 tests
>> format long
>> runsometests('libinterp/corefcn/pr-output.cc-tst')
Testing /usr/local/Cellar/octave-stable/stable/share/octave/5.0.1/etc/tests/libinterp/corefcn/pr-output.cc-tst
***** test
 str = evalc ("x = 1.1; display (x)");
 assert (str, "x =  1.1000\n");
!!!!! test failed
ASSERT errors for:  assert (str,"x =  1.1000\n")

  Location  |  Observed  |  Expected  |  Reason
     []      x =  1.100000000000000
 x =  1.1000
   Strings don't match
>> ver
----------------------------------------------------------------------
GNU Octave Version: 5.0.1 (hg id: ada14ef3067f with local changes)


The test suite should probably be immune to user format settings, either in the tests themselves, or by temporarily setting the format settings back to the default while running the test suite.

Affects 4.4.1 and stable.

Andrew Janke <apjanke>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by apjanke (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-21 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2019-01-21 mtmiller StatusNone Confirmed
        Release4.4.1 5.0.1

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code