Mercurial > hg > octave-lyh
changeset 12859:372eb47cd6a5
Wrote 1 test for list_primes.m
author | Giles Anderson <agander@gmail.com> |
---|---|
date | Sun, 17 Jul 2011 18:08:06 -0500 |
parents | 6ceca9beb331 |
children | abd4093753e0 |
files | scripts/miscellaneous/list_primes.m |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/list_primes.m +++ b/scripts/miscellaneous/list_primes.m @@ -83,3 +83,9 @@ endwhile endfunction + +%!test +%! assert (list_primes(), [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41,\ +%! 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]); +%! assert (list_primes(5), [2, 3, 5, 7, 11]); +