\documentclass[a4paper]{article}

\usepackage{pgfplots}
\usepackage{pgfplots.assert}

\pgfplotsset{compat=1.7}

\begin{document}

\begin{tikzpicture}
	\begin{axis}[
		bar shift=1,
		bar width=1,
		xmin=0,xmax=1,ymin=0,ymax=1,
	]

\makeatletter
\gdef\b@GOT@ERROR{0}%
\def\pgfplots@bar@mathparse@error#1#2{%
	\gdef\b@GOT@ERROR{1}%
}%

	% should cause errors because we used units, but did not specify
	% which axis:
	\pgfmathparse{\pgfplotbarwidth}

\pgfplotsassertequalstok{1}{\b@GOT@ERROR}{got no error}

\gdef\b@GOT@ERROR{0}
	\pgfmathparse{\pgfplotbarshift}
		
\pgfplotsassertequalstok{1}{\b@GOT@ERROR}{got no error}
	\end{axis}
\end{tikzpicture}
\end{document}

