\input regression-test.tex \documentclass{article} \usepackage{tikzphysics} \makeatletter \begin{document} \START \hbadness=10000 \@for\Feature:=\tikzphysics@reference@nodes\do{% \setbox0=\hbox{\begin{tikzpicture} \node[\Feature,show anchors,show keys] (N) {}; \edef\Logical{\csname tikzphysics@reference@lookup@\Feature\endcsname} \edef\Families{\csname tikzphysics@reference@families@\Logical\endcsname} \@for\Family:=\Families\do{% \pgf@process{\pgfpointanchor{N}{\Family-0}}% \pgf@process{\pgfpointanchor{N}{\Family-50}}% \pgf@process{\pgfpointanchor{N}{\Family-100}}% } \end{tikzpicture}}% \TYPE{PASS: \Feature\space named anchors and family endpoints} } \@for\Feature:=\tikzphysics@reference@features\do{% \setbox0=\hbox{\begin{tikzpicture}\physicshelp{\Feature}\end{tikzpicture}}% \TYPE{PASS: \Feature\space reference card} } \setbox0=\hbox{\begin{tikzpicture}\physicshelp{index}\end{tikzpicture}} \TYPE{PASS: feature index} \setbox0=\hbox{\begin{tikzpicture} \node[wedge,show anchors,physics debug/anchor list={}, physics debug/anchor families=all, physics debug/anchor samples={0,25,...,100}] (W) {}; \end{tikzpicture}} \TYPE{PASS: all anchor families with native sample range} % Every registered node must actually invoke both overlays, not just have % reference entries and queryable anchors. \newcount\ExpectedNodeOverlays \newcount\ActualAnchorOverlays \newcount\ActualKeyOverlays \def\tikzphysics@debug@drawanchors#1{\global\advance\ActualAnchorOverlays by1} \def\tikzphysics@debug@drawkeys#1{\global\advance\ActualKeyOverlays by1} \@for\Feature:=\tikzphysics@reference@nodes\do{% \global\advance\ExpectedNodeOverlays by1 \setbox0=\hbox{\begin{tikzpicture} \node[\Feature,show anchors,show keys] {}; \end{tikzpicture}}% } \ifnum\ActualAnchorOverlays=\ExpectedNodeOverlays \TYPE{PASS: all registered nodes emit anchor overlays}% \else \TYPE{FAIL: registered node anchor overlay count}% \fi \ifnum\ActualKeyOverlays=\ExpectedNodeOverlays \TYPE{PASS: all registered nodes emit key overlays}% \else \TYPE{FAIL: registered node key overlay count}% \fi \END \end{document}