I read about the Dirac delta distribution some days ago to better understand distributions (or generalized functions), but I've become a bit confused. I used $\delta$ as a "function" ($\delta(x)$) until now, without thinking about its strict definition. I usually used the following formula: \begin{equation} \int_{-\infty}^\infty \delta(x) f(x) dx = f(0), \end{equation} but never thought about the properties of the $f(x)$ functions. Now as I understand, distributions are linear, continous functionals from some vector space of test functions $\mathcal{D}$, where the functions in $\mathcal{D}$ are smooth and have compact support. Also, I've read that the test function space can be extended to the Swartz-functions (~ rapidly decreasing functions (faster than polynomial)).
But - if I'm correct -, none of these space include e.g. sin(x), cos(x), or any polynomial, etc., but it looks for me, that people use integrals with Dirac-$\delta$ in the same way (Understanding Dirac delta integrals?). So, my question is that, is there any other extension of the test function space to include these ones? And also, how can we deal with complex test functions? These are probably interesting from the Fourier transformation point of view. (P.s.: I'm not a mathematician, so please give me "relativily" simple answers, or give me some reference book / text, where I can read about these.)