changeset 12852:0232a5300adf

codesprint: Add 1 test to powerset.m
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Sat, 16 Jul 2011 17:57:53 -0500
parents 7fce673b934a
children 7869cc61ce90
files scripts/set/powerset.m
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/set/powerset.m
+++ b/scripts/set/powerset.m
@@ -75,3 +75,9 @@
   endif
 
 endfunction
+
+
+%!test
+%! c = sort (cellstr ({ [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3]}));
+%! p = sort (cellstr (powerset ([1, 2, 3])));
+%! assert (p, c));
\ No newline at end of file