Updated polygon_test Fixed polygon

Fixed some minor bugs in polygon via adding several test methods in
polygon_test