Six subgrid models for the turbulent stress tensor are tested by conducting large-eddy simulations (LES) of the weakly compressible temporal mixing layer: the Smagorinsky, similarity, gradient, dynamic eddy-viscosity, dynamic mixed and dynamic Clark models. The last three models are variations of the first three models using the dynamic approach. Two sets of simulations are performed in order to assess the quality of the six models. The LES results corresponding to the first set are compared with filtered results obtained from a direct numerical simulation (DNS). It appears that the dynamic models lead to more accurate results than the non-dynamic models tested. An adequate mechanism to dissipate energy from resolved to subgrid scales is essential. The dynamic models have this property, but the Smagorinsky model is too dissipative during transition, whereas the similarity and gradient models are not sufficiently dissipative for the smallest resolved scales. In this set of simulations, at moderate Reynolds number, the dynamic mixed and Clark models are found to be slightly more accurate than the dynamic eddy-viscosity model. The second set of LES concerns the mixing layer at a considerably higher Reynolds number and in a larger computational domain. An accurate DNS for this mixing layer can currently not be performed, thus in this case the LES are tested by investigating whether they resemble a self-similar turbulent flow. It is found that the dynamic models generate better results than the non-dynamic models. The closest approximation to a self-similar state was obtained using the dynamic eddy-viscosity model.