Actually you have the declare in the wrong place, it should go before (interactive):
(defun test (&rest args)
"Function with declare form."
(declare (indent 1))
Then if you macroexpand you can see what it does:
"Function with declare ...