I need to perform a test on the current font shape. More specifically, I need to detect whether the current font shape is italic or slanted.
Joseph Wright already provided a solution in his answer to Detect which text "mode" (normal, italic, bold, etc.) is currently in use?. For instance, if you define
\newcommand*{\my@test@it}{it}
then
\ifx\f@shape\my@test@it
will be true if the current font shape is italics.
However, as I'm trying to avoid code duplication as much as possible, I'm wondering whether there really is a need to define macros that expands to it (for italics), sl (for slanted), etc. I suspect there may already exist such macros, perhaps defined in the LaTeX kernel. Is that the case? If so, what are those macros called?

\slshape\ifx\f@shape\sldefaultfails. I guess it's got to do with this\sldefaultbeing long whereas\f@shapeisn't... – jub0bs Mar 06 '14 at 13:12\slshape. – yo' Mar 06 '14 at 14:31sl, for example: depends what you want to test for – Joseph Wright Mar 06 '14 at 14:34\f@shapeand\ifxcomparing it to both\itdefaultand\sldefault. Seems to work fine. – jub0bs Mar 07 '14 at 10:22