octave-maintainers
[Top][All Lists]
Advanced

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

Re: char ()


From: John W. Eaton
Subject: Re: char ()
Date: Thu, 15 Sep 2011 09:13:06 -0400

On 15-Sep-2011, Ben Abbott wrote:

| 
| On Sep 15, 2011, at 2:02 AM, Carlo de Falco wrote:
| 
| > After changeset af36cdb552a6 char does not throw an error if called with 
| > no arguments, so the check for this error in test/test_string.m is 
obsolete, right?
| > c.
| > 
| > <open_bQnvOGwj.txt>
| 
| Yes. I think the test is obsolete.
| 
| Both Matlab and the current tip return an empty string when called with no 
inputs.
| 
|       isempty (char())
|       ans =  1
| 
| Should the test be modified to reflect the proper behavior?
| 
| %% test/octave.test/string/char-2.m
| %!assert (isempty (char ()))

Yes, I changed the behavior of char() for Matlab compatibility.  I
also changed the tests for char in strfns.cc to match but missed the
ones in test_string.m.  Carlo, your change is correct, but I would
like to move all the tests from test_string.m to the source files so
the tests are with the source code for the functions they test instead
of in a separate file where they can easily be missed.  Then we can
remove test_string.m.  I can make this change later today.

jwe


reply via email to

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