Test restyling

Switch existing tests to use a new style: remove unnecessary local vars, typedefs, namespaces, and templates specialization.