octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8783] C++ implementation of textscan


From: Ben Abbott
Subject: [Octave-patch-tracker] [patch #8783] C++ implementation of textscan
Date: Sun, 06 Mar 2016 01:06:46 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/601.4.4

Follow-up Comment #65, patch #8783 (project octave):

I applied the patches on Mac OS X. I did not encounter any new problems. I ran
the tests on textacan and ytextscan.


>> test textscan
***** test
 assert (textscan ("1i", ""){1},  0+1i);
 assert (cell2mat (textscan ("3, 2-4i, NaN\n -i, 1, 23.4+2.2i", "")), [3+0i,
2-4i, NaN+0i; 0-i,  1+0i, 23.4+2.2i]);
!!!!! test failed
ASSERT errors for:  assert (textscan ("1i", "") {1},0 + 1i)

  Location  |  Observed  |  Expected  |  Reason
     ()           O            E         real != complex
>> which textscan
'textscan' is a function from the file
/Users/bpabbott/Development/mercurial/default/sources/scripts/io/textscan.m
>> which xtextscan
>> test xtextscan
????? xtextscan does not exist in path
>> test ytextscan
***** test
 f = tempname ();
 fid = fopen (f, "w+");
 d = rand (1, 4);
 fprintf (fid, "  %f %f /* comment */  %f  %f ", d);
 fseek (fid, 0, "bof");
 A = ytextscan (fid, "%f %f", "CommentStyle", {"/*", "*/"});
 E = feof (fid);
 fclose (fid);
 unlink (f);
 assert (A{1}, [d(1); d(3)], 1e-6);
 assert (A{2}, [d(2); d(4)], 1e-6);
 assert (E);
!!!!! test failed
ASSERT errors for:  assert (A {1},[d(1); d(3)],1e-6)

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x1)       E(2x1)      Dimensions don't match



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8783>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]