assert with side-effects