tests for square method