changeset 12804:a44ec6d33cc9

codesprint: Wrote 5 tests for polyout.m
author David Wells <drwells@vt.edu>
date Sat, 16 Jul 2011 13:13:19 -0500
parents b7a6a3644f3b
children 3641167e5b75
files scripts/polynomial/polyout.m
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/polyout.m	Sat Jul 16 10:56:19 2011 -0700
+++ b/scripts/polynomial/polyout.m	Sat Jul 16 13:13:19 2011 -0500
@@ -97,3 +97,9 @@
     str = num2str (c, 5);
   endif
 endfunction
+
+%!assert (polyout ([3 2 1]), '3*s^2 + 2*s^1 + 1')
+%!assert (polyout ([3 2 1], 'x'), '3*x^2 + 2*x^1 + 1')
+%!assert (polyout ([3 2 1], 'wxyz'), '3*wxyz^2 + 2*wxyz^1 + 1')
+%!assert (polyout ([5 4 3 2 1], '1'),'5*1^4 + 4*1^3 + 3*1^2 + 2*1^1 + 1')
+%!error polyout ([])