Test cases for polynomial.
Minor changes.
Test cases for polynomial.
Test cases for matrix.
Test cases for matrix.