Add a test for 2D quadratic function