This is the first part of a couple question I have, separated in different threads.
First off, while I am creating a class to be used in some other program, where should I place my test code. If my class is going to be used by some other file should I test my class with separate file or within the same file?
For example: I am create a class Token, it is declared in Token.h and implemented in Token.cpp but while I am testing to make sure everything works can I use a main() method in my Token.cpp or will that cause issues when I want to use Token later on? If not in Token.cpp I assume I would test with a separate file like Token_Test.cpp? or I suppose I could test in Token with main() and then comment out once I am confident it works as desired?
Thanks