Devise, document, and implement test cases for convertBase() function