bugGNU Octave - Bugs: bug #34338, Test fail in mappers.cc (MinGW)

 
 

bug #34338: Test fail in mappers.cc (MinGW)

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Tue 20 Sep 2011 06:42:03 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 30 Nov 2011 10:54:15 PM UTC, comment #6: 

Now

  src\mappers.cc ......................................... PASS  316/316

Thanks!
This post can be closed.

Tatsuro MATSUOKA <tmacchant>
Wed 30 Nov 2011 09:57:25 PM UTC, comment #5: 

Thanks.  It is clear that the problem is at position 10 in the expected results.  The test being run is quoted below.


%! charset = char (0:127);
%! result = zeros (1, 128);
%! result (33:127) = 1;
%! if (ispc () && ! isunix ())
%!   result(10) = 1;
%! endif
%! assert (isprint (charset), logical (result));


Clearly, Octave is trying to detect MinGW and change the results for character 10 (<Return Key>).  If MinGW now returns 0 for character 10 then I will just delete the extra code in the test.  Hopefully this won't cause a problem with CygWin.

Please try updating to revision 13966:62a18e06cfc5 (http://hg.savannah.gnu.org/hgweb/octave/rev/62a18e06cfc5) where I have modified the test.  It should pass now.

Rik <rik5>
Group administrator
Wed 30 Nov 2011 09:21:27 PM UTC, comment #4: 

The result is


>>>>> processing e:\usr\Tatsu\mingwhome\octaves\hg\octave-work\src\mappers.cc
  ***** test
 charset = setstr (0:127);
 result = zeros (1, 128);
 result (33:127) = 1;
 if (ispc () && ! isunix ())
   result(10) = 1;
 endif
 assert (isprint (charset), logical (result));
!!!!! test failed
assert (isprint (charset),logical (result)) expected
 Columns 1 through 20:

   0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0

 Columns 21 through 40:

   0   0   0   0   0   0   0   0   0   0   0   0   1   1   1   1   1   1   1   1

 Columns 41 through 60:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 61 through 80:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 81 through 100:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 101 through 120:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 121 through 128:

   1   1   1   1   1   1   1   0
but got
 Columns 1 through 20:

   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

 Columns 21 through 40:

   0   0   0   0   0   0   0   0   0   0   0   0   1   1   1   1   1   1   1   1

 Columns 41 through 60:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 61 through 80:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 81 through 100:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 101 through 120:

   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1

 Columns 121 through 128:

   1   1   1   1   1   1   1   0



Tatsuro MATSUOKA <tmacchant>
Wed 30 Nov 2011 06:57:07 PM UTC, comment #3: 

Tatsuro,

Can you apply the attached patch and then run 'test mappers.cc'?

I've changed the test code so it will print out the expected values and the real values.  This way we can find the exact problem.

(file #24507)

Rik <rik5>
Group administrator
Wed 30 Nov 2011 09:33:18 AM UTC, comment #2: 

Is this test still failing with the latest development code?  src\mappers.cc ......................................... PASS  315/316  FAIL 1

Yes.  when I have execute the above from octave prompt, no error appeared as was written in the first post. ????

Tatsuro MATSUOKA <tmacchant>
Wed 30 Nov 2011 06:05:56 AM UTC, comment #1: 

Is this test still failing with the latest development code?

Rik <rik5>
Group administrator
Tue 20 Sep 2011 06:42:03 AM UTC, original submission:  

I have built the development source.

changeset 13167:f7cb824dc8c0
Mon Sep 19 18:03:43 2011 -0700


  ***** test
 charset = setstr (0:127);
 result = zeros (1, 128);
 result (33:127) = 1;
 if (ispc () && ! isunix ())
   result(10) = 1;
 endif
 assert(all (isprint (charset) == result));
!!!!! test failed
assert (all (isprint (charset) == result)) failed


As far as I remember, the test above was in the test_string.m.
This is already known but 

However when I have execute the above from octave prompt, no error appeared.

Tatsuro MATSUOKA <tmacchant>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #24507:  mappers.patch added by rik5 (371B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by tmacchant (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-11-30 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2011-11-30 rik5 Attached File- Added mappers.patch, #24507

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code