Mercurial > octave
diff scripts/strings/dec2bin.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | fa78cb8d8a5c |
line wrap: on
line diff
--- a/scripts/strings/dec2bin.m Tue Jan 22 21:34:24 2008 +0000 +++ b/scripts/strings/dec2bin.m Tue Jan 22 21:52:26 2008 +0000 @@ -49,3 +49,12 @@ endif endfunction + +%!assert(strcmp (dec2bin (14), "1110")); + +%!error dec2bin (); + +%!assert(strcmp (dec2bin (14, 6), "001110")); + +%!error dec2bin (1, 2, 3); +