Let $\mathcal{P}=\{\infty, 2,3,5,7,11,\ldots\}$ be the set of primes of $\mathbb{Q}$ and let $\mathbb{Q}_p$ denote the corresponding completions, so in particular $\mathbb{Q}_{\infty}=\mathbb{R}$.

Is it possible to give a definition of the spaces of test functions $S(\mathbb{Q}_p)$ together with their standard topologies (finest locally convex for $p$ finite and usual Frechet in the real case) in a completely uniform way with respect to $p\in\mathcal{P}$?

It is not too hard to uniformly define $L^2(\mathbb{Q}_p, dx)$ as well as the Fourier transform as a unitary transformation on this space. The kind of definition I am looking for might look like:
$S(\mathbb{Q}_p)$ is the smallest subspace of $L^2$ which is invariant by Fourier transform and... *insert mystery property here*...