Mercurial > hg > octave-lyh
changeset 8629:f07730ed5613
test_system.m: use isfield instead of struct_contains
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 29 Jan 2009 13:29:28 -0500 |
parents | 17a3a7bebac5 |
children | 540165304f00 |
files | test/ChangeLog test/test_system.m |
diffstat | 2 files changed, 35 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2009-01-29 John W. Eaton <jwe@octave.org> + + * test_system.m: Use isfield instead of struct_contains. + 2009-01-25 Thorsten Meyer <thorsten@hexe> * test_struct.m: Add struct array tests.
--- a/test/test_system.m +++ b/test/test_system.m @@ -175,16 +175,16 @@ %! [s, err, msg] = stat (filesep); %! assert((err == 0 %! && isstruct (s) -%! && struct_contains (s, "dev") -%! && struct_contains (s, "ino") -%! && struct_contains (s, "modestr") -%! && struct_contains (s, "nlink") -%! && struct_contains (s, "uid") -%! && struct_contains (s, "gid") -%! && struct_contains (s, "size") -%! && struct_contains (s, "atime") -%! && struct_contains (s, "mtime") -%! && struct_contains (s, "ctime") +%! && isfield (s, "dev") +%! && isfield (s, "ino") +%! && isfield (s, "modestr") +%! && isfield (s, "nlink") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "size") +%! && isfield (s, "atime") +%! && isfield (s, "mtime") +%! && isfield (s, "ctime") %! && ischar (msg))); %% test/octave.test/system/stat-2.m @@ -198,16 +198,16 @@ %! [s, err, msg] = lstat (filesep); %! assert((err == 0 %! && isstruct (s) -%! && struct_contains (s, "dev") -%! && struct_contains (s, "ino") -%! && struct_contains (s, "modestr") -%! && struct_contains (s, "nlink") -%! && struct_contains (s, "uid") -%! && struct_contains (s, "gid") -%! && struct_contains (s, "size") -%! && struct_contains (s, "atime") -%! && struct_contains (s, "mtime") -%! && struct_contains (s, "ctime") +%! && isfield (s, "dev") +%! && isfield (s, "ino") +%! && isfield (s, "modestr") +%! && isfield (s, "nlink") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "size") +%! && isfield (s, "atime") +%! && isfield (s, "mtime") +%! && isfield (s, "ctime") %! && ischar (msg))); %% test/octave.test/system/lstat-2.m @@ -370,13 +370,13 @@ %! s = getpwent (); %! endpwent (); %! assert((isstruct (s) -%! && struct_contains (s, "name") -%! && struct_contains (s, "passwd") -%! && struct_contains (s, "uid") -%! && struct_contains (s, "gid") -%! && struct_contains (s, "gecos") -%! && struct_contains (s, "dir") -%! && struct_contains (s, "shell"))); +%! && isfield (s, "name") +%! && isfield (s, "passwd") +%! && isfield (s, "uid") +%! && isfield (s, "gid") +%! && isfield (s, "gecos") +%! && isfield (s, "dir") +%! && isfield (s, "shell"))); %% test/octave.test/system/getpwent-2.m %!error <Invalid call to getpwent.*> getpwent (1); @@ -426,10 +426,10 @@ %! x = getgrent (); %! endgrent (); %! assert((isstruct (x) -%! && struct_contains (x, "name") -%! && struct_contains (x, "passwd") -%! && struct_contains (x, "gid") -%! && struct_contains (x, "mem"))); +%! && isfield (x, "name") +%! && isfield (x, "passwd") +%! && isfield (x, "gid") +%! && isfield (x, "mem"))); %% test/octave.test/system/getgrent-2.m %!error <Invalid call to getgrent.*> getgrent (1);