# HG changeset patch # User David Wells # Date 1310839999 18000 # Node ID a44ec6d33cc9dbba16d0803c0eadd8dc05a41494 # Parent b7a6a3644f3bc3508b23a58831c5ada768fb3169 codesprint: Wrote 5 tests for polyout.m diff --git a/scripts/polynomial/polyout.m b/scripts/polynomial/polyout.m --- a/scripts/polynomial/polyout.m +++ b/scripts/polynomial/polyout.m @@ -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 ([])