Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring tests #26

Closed
wants to merge 12 commits into from
Closed

Refactoring tests #26

wants to merge 12 commits into from

Conversation

fgochez
Copy link

@fgochez fgochez commented May 31, 2012

The tests have been restructured and enhanced for maintainability. In outline, the following changes have been made:

  • Created a "testall" build target that generates a single "testall" executable which runs all tests.
  • Removed "main" functions from tests and moved them to a stand-alone testxxx_main.cpp file. These will allow individual tests to be run in a standalone fashion.
  • Refactored existing tests to make structure more consistent, added PartioTests namespace.
  • Moved old "testkdtree.cpp" tests to "testparticlessimple.cpp", and added a new set of tests which test the KdTree class in a standalone fashion to "testkdtree.cpp".

In general existing test logic has not really been changed except for the KdTree tests, so modification of the tests is work in progress. However, I think it might be a good time to merge in the new structure and continue enhancing tests in the future.

Ongoing discussion:
http://groups.google.com/group/partio-discuss/browse_thread/thread/19984fe2b39749e4

functions so that they can be invoked from other places, added a "testall"
file which allows for execution of full test suite.  Also adding TESTEXPECT
macro to allow for test assertions that do not throw exceptions.
Also making some additional minor stylistic changes in
namespace use
in was causing many compilation errors for the tests)
individual tear up/down in each test function.  Adding tests
for other routines
@aselle
Copy link
Contributor

aselle commented Jun 5, 2012

Thanks for the contribution. Sorry I haven't gotten to this yet. But I hope
to real soon(tm).

On Thu, May 31, 2012 at 2:59 PM, Francisco Gochez <
reply@reply.github.com

wrote:

The tests have been restructured and enhanced for maintainability. In
outline, the following changes have been made:

  • Created a "testall" build target that generates a single "testall"
    executable which runs all tests.
  • Removed "main" functions from tests and moved them to a stand-alone
    testxxx_main.cpp file. These will allow individual tests to be run in a
    standalone fashion.
  • Refactored existing tests to make structure more consistent, added
    PartioTests namespace.
  • Moved old "testkdtree.cpp" tests to "testparticlessimple.cpp", and added
    a new set of tests which test the KdTree class in a standalone fashion to
    "testkdtree.cpp".

In general existing test logic has not really been changed except for the
KdTree tests, so modification of the tests is work in progress. However, I
think it might be a good time to merge in the new structure and continue
enhancing tests in the future.

Ongoing discussion:

http://groups.google.com/group/partio-discuss/browse_thread/thread/19984fe2b39749e4

You can merge this Pull Request by running:

git pull https://github.com/fgochez/partio master

Or you can view, comment on it, or merge it online at:

#26

-- Commit Summary --

  • Refactoring test code. Test routines are being seperated out from "main"
  • Added comment to point out failing tests
  • Minor tweaks to code layout
  • Changing namespace for tests from "Partio" to "PartioTests".
  • Merge remote-tracking branch 'upstream/master'
  • - moving header files out of "namespace Partio" (leaving them
  • (WIP) - changing to a direct test of kdtree
  • removing data generation set generation logic, replacing with
  • Small addition to docs
  • Correcting and adding more tests
  • added tests with non-stl containers
  • Re-adding the old "kdtree" tests as tests for the

-- File Changes --

M src/lib/core/KdTree.h (19)
M src/tests/CMakeLists.txt (16)
A src/tests/partiotesting.h (32)
A src/tests/testall.cpp (56)
M src/tests/testcache.cpp (18)
A src/tests/testcache.h (9)
A src/tests/testcache_main.cpp (45)
M src/tests/testiterator.cpp (30)
A src/tests/testiterator.h (8)
A src/tests/testiterator_main.cpp (40)
M src/tests/testkdtree.cpp (230)
A src/tests/testkdtree.h (49)
A src/tests/testkdtree_main.cpp (41)
A src/tests/testparticlessimple.cpp (130)
A src/tests/testparticlessimple.h (47)
A src/tests/testparticlessimple_main.cpp (41)
R src/tests/testsaveload.cpp (51)
A src/tests/testsaveload.h (49)
A src/tests/testsaveload_main.cpp (49)
M src/tests/teststr.cpp (60)
A src/tests/teststr.h (12)
A src/tests/teststr_main.cpp (44)

-- Patch Links --

https://github.com/wdas/partio/pull/26.patch
https://github.com/wdas/partio/pull/26.diff


Reply to this email directly or view it on GitHub:
#26

@fgochez fgochez closed this Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants