[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan
From: |
Philip Nienhuis |
Subject: |
[Octave-patch-tracker] [patch #8783] C++ implementation of textscan |
Date: |
Tue, 15 Mar 2016 20:41:39 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:41.0) Gecko/20100101 Firefox/41.0 SeaMonkey/2.38 |
Follow-up Comment #84, patch #8783 (project octave):
With the latest patches, I get on Linux (Mageia 5):
>>>>> processing
/home/philip/devel/octdev/oct410+VEyTS/libinterp/corefcn/textscan.cc-tst
***** test
a = textscan (",1,,4\nInf, ,NaN", "", "delimiter", ",", "emptyvalue", -10);
assert (cell2mat (a), [-10, 1, -10, 4; Inf, -10, NaN, -10]);
!!!!! test failed
cat: dimension mismatch
where I think the test is wrong - there should be a trailing comma (delimiter)
after the NaN in the test string.
***** test
str = "11, 12, 13,, 15\n21,, 23, 24, 25\n,, 33, 34, 35";
C = textscan (str, "%f %f %f %f", "delimiter", ",", "multipledelimsasone", 1,
"endofline", "\n");
assert (C{1}', [11, 21, 33]);
assert (C{2}', [12, 23, 34]);
assert (C{3}', [13, 24, 35]);
assert (C{4}', [15, 25, NaN]);
!!!!! test failed
ASSERT errors for: assert (C {4}',[15, 25, NaN])
Location | Observed | Expected | Reason
. O(1x2) E(1x3) Dimensions don't match
where textscan.cc apparently doesn't note the missing field before the double
delimiter on the third line of str.
But Matlab r2016a prerelease doesn't note it either => Matlab bug?
In the other FAIL Matlab and Octave's textscan.cc do it right on the first
line, but then 'multipledelimsasone´ hasn't been specified. Experimenting a
bit with Matlab shows that it is that parameter that screws it up.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?8783>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, (continued)
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, John W. Eaton, 2016/03/13
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/13
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/14
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/14
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/14
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, John W. Eaton, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan,
Philip Nienhuis <=
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Lachlan Andrew, 2016/03/15
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/16
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Ben Abbott, 2016/03/16
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, John W. Eaton, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Mike Miller, 2016/03/17
- [Octave-patch-tracker] [patch #8783] C++ implementation of textscan, Philip Nienhuis, 2016/03/17