TestingGuidelines: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Created page with 'When adding a new class, a test should also be added in ...VTK/Package/Testing/Cxx/ The name of the file for the test should be ClassName.cxx where the name of the class is vt…')
 
No edit summary
Line 1: Line 1:
When adding a new class, a test should also be added in  
* When adding a new concrete class, a test should also be added in  
  ...VTK/Package/Testing/Cxx/
  ...VTK/Package/Testing/Cxx/


The name of the file for the test should be ClassName.cxx where the name of the class is vtkClassName.
* The name of the file for the test should be ClassName.cxx where the name of the class is vtkClassName.


Each test should call several functions, each as short as possible, to exercise a specific functionality of the class. 1,000 lines in main() is very hard to maintain...
* Each test should call several functions, each as short as possible, to exercise a specific functionality of the class. 1,000 lines in main() is very hard to maintain...
 
* The "main()" function of the test file must be called TestClassName(int, char*[])

Revision as of 18:49, 21 August 2010

  • When adding a new concrete class, a test should also be added in
...VTK/Package/Testing/Cxx/
  • The name of the file for the test should be ClassName.cxx where the name of the class is vtkClassName.
  • Each test should call several functions, each as short as possible, to exercise a specific functionality of the class. 1,000 lines in main() is very hard to maintain...
  • The "main()" function of the test file must be called TestClassName(int, char*[])