According to the Cambridge dictionary and to the Merriam-Webster dictionary, "assert" means "to say that something is certainly true". The Oxford dictionary gives a similar definition among others:
III. To declare, state.
7 trans. To declare formally and distinctly, to state positively, aver, affirm.
So to me it sounds strange to use it as "to check". I haven't seen a definition similar to "to check" in the three dictionaries above. I didn't know it was used this way in programming.
Edit: my understanding of the programming term was wrong, see other comments.