In a VC++ workspace with multiple projects to build libraries for one exe, do you recommended keeping the test files in a separate test directory or in the various production code directories?
I'm assuming the test files are only built into a separate test app in a separate project, as opposed to being added to the main production code. (?)
Advice appreciated.
Kelley
mkh@veeco.com
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The decision depends entirely on what you want to do. :) In my many small projects, I keep all files in one directory; class.cpp, class.h, and class_t.cpp is the test file. In a bigger project that I'm just now starting, I'll be keeping the tests separate from the other project files.
As for building your tests in to your executable, most certainly allow for having the tests built and link with the production code, there might be "Release" issues, after all. However, it would be prudent to have a target that doesn't link in those tests. In any case, I keep them all in the same project; makes more sense to me that way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In a VC++ workspace with multiple projects to build libraries for one exe, do you recommended keeping the test files in a separate test directory or in the various production code directories?
I'm assuming the test files are only built into a separate test app in a separate project, as opposed to being added to the main production code. (?)
Advice appreciated.
Kelley
mkh@veeco.com
The decision depends entirely on what you want to do. :) In my many small projects, I keep all files in one directory; class.cpp, class.h, and class_t.cpp is the test file. In a bigger project that I'm just now starting, I'll be keeping the tests separate from the other project files.
As for building your tests in to your executable, most certainly allow for having the tests built and link with the production code, there might be "Release" issues, after all. However, it would be prudent to have a target that doesn't link in those tests. In any case, I keep them all in the same project; makes more sense to me that way.