Backport #33870 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Follow up recent render system refactoring PRs (split test code), and fine tune the math render (added some new cases)