Added tests for qr function.