We compute the stress autocorrelation function in a two- and three-dimensional system by using the lattice-Boltzmann method. The algebraic long-time behavior ~t-d/2 in the stress correlation function is clearly observed. The amplitude of this tail is compared with the mode-coupling expression for the long-time tail in the stress correlation function. Agreement is found between the mode-coupling theory and simulation in both two and three dimensions.