|
This is an experiment with writing some simple unit tests. I'm working on some changes to the convex hull tool, so I wrote a few test cases for that. In general I think it'd be nice to have a place to put tests written in C (we already have some Python tests, but some things are easier to test in C, particularly where the Py API is missing stuff.)
Commit message
==============
Add C unit tests for convex hull
* Add a new "--unit-tests" command line option for Blender. It is only available when compiling in debug mode.
* Add a small set of unit tests for convex hull. They are definitely not providing complete coverage yet.
TODO:
* Add unit tests for other tools.
* Consider using an existing unit-testing library for more advanced features.
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+740 lines, -1 line) |
Patch |
|
|
build_files/scons/tools/Blender.py
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
source/SConscript
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blenderplayer/bad_level_call_stubs/stubs.c
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
|
source/creator/CMakeLists.txt
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
|
source/creator/creator.c
|
View
|
1
|
3 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/CMakeLists.txt
|
View
|
1
|
1 chunk |
+25 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/SConscript
|
View
|
1
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/unit_test.h
|
View
|
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/unit_test.c
|
View
|
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/unit_test_convex_hull.c
|
View
|
1
|
1 chunk |
+577 lines, -0 lines |
0 comments
|
Download
|
|
|
source/tests/unit_test_intern.h
|
View
|
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
Total messages: 2
|