Tests for the two-sample problem based on empirical probability measures