Vladimir
Vladimir

Reputation: 292

C: invoke 2 functions with same name but different packages

I want to write unit tests for my self-written standard c library. So, i want to compare output of functions <ctype.h>::tolower amd my tolower implementation. How can i do it without renaming my functions?

Upvotes: 0

Views: 41

Answers (1)

Rapha&#235;l Dalmon
Rapha&#235;l Dalmon

Reputation: 36

I think you could add a define at the start of the header of your library like this : #define tolower my_tolower Adding this pre-processor command will automatically renamed your function temporary in your files, after that in the main you only have to call my_tolower

Upvotes: 1

Related Questions