assert verifies if an expression is true. It returns no output if the statement is indeed true.

. egen car_space = rowmean(headroom length)

. gen car_space2 = (headroom+length)/2

both have created an arbitrary measure for car space using the mean of headroom and car length.

. assert car_space == car_space2 examines if the two methods yield the same results.