(#21193) Fix rgen assertion check

Corrects `@asserted` to be `@@asserted` and assigns `true` value upon
successful assertion.
Merge pull request #1701 from hunner/fix/master/rgen_assert_check

(#21193) Fix rgen assertion check