Fri 27 Jan 2017 10:23:52 AM UTC, comment #9:
Many thanks for the quick fix - I can confirm it works fine now.
|
Thu 26 Jan 2017 06:12:32 PM UTC, comment #8:
And yes, the tests are better, but many more could be added.
The tests I just added are good for scalar/matrix types, but not for reading without conversion (result is double) or for other conversion combinations when reading and writing. There's a lot to test for just fread/fwrite...
|
Thu 26 Jan 2017 06:11:04 PM UTC, comment #7:
Oh damn, I copied the test to a separate file for quick testing, then fixed the problems there and forgot to copy them back. Checking in a fix as soon as I can verify that I haven't made some other stupid mistake.
|
Thu 26 Jan 2017 05:49:05 PM UTC, comment #6:
New failing test in io.tst after running 'make check':
Looks like instances of "m" should be replaced with "m_in", and "s" with "s_in".
|
Thu 26 Jan 2017 05:40:13 PM UTC, comment #5:
On the testing note, we still don't have 100% function coverage, let alone 100% line coverage, but I think the test suite has grown large enough to finally be valuable. I don't think we are making so many quick fixes that lead to later bugs because more of those problems are getting caught early by the regression tests.
That's mostly a "hurray for us" statement as things are getting better.
|
Thu 26 Jan 2017 05:25:04 PM UTC, comment #4:
I pushed the following fix (with a test!):
http://hg.savannah.gnu.org/hgweb/octave/rev/8aba6d170887
Reopen if this doesn't fix the problem.
The skip parameter probably should be octave_idx_type, but that's something to fix for another day...
|
Thu 26 Jan 2017 05:13:15 PM UTC, comment #3:
jwe's diagnosis is correct. The problem is the difference between scalar/matrix rather than between say double/uint32. See the following.
|
Thu 26 Jan 2017 04:56:27 PM UTC, comment #2:
It's not the conversion routines, it's a mistake in the prototype for the write function for scalar integer octave_value types, int vs octave_idx_type. I'll fix.
|
Thu 26 Jan 2017 04:50:33 PM UTC, comment #1:
Confirmed. Octave seems to be missing a large number of conversion routines.
|
Thu 26 Jan 2017 04:09:40 PM UTC, original submission:
Running the follwing with current tip:
returns:
fwrite returns 1 as expected if second argument is double, or with 4.2.
|