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

Added unit test manager #12

Merged
merged 12 commits into from
Nov 7, 2015
Merged

Added unit test manager #12

merged 12 commits into from
Nov 7, 2015

Conversation

SensibleSalmon
Copy link
Collaborator

TODO:

  • convert the remaining UTests to Catch tests
  • add test maketarget to master Makefile
  • add diff-cover maketarget to loudly complain about differences in coverage
  • Add docs on writing tests
  • Squash all the things

Not ready for merge.

Technically depends on #10
Addresses #1

@SensibleSalmon
Copy link
Collaborator Author

Current progress: Have migrated all of utests/tools/* to catch.

Now we just have to do the rest (ugh)

@SensibleSalmon
Copy link
Collaborator Author

Current coverage stats:

capture

@SensibleSalmon
Copy link
Collaborator Author

Also ran into a bad test with geometry:

REQUIRE(body1.CalcPressure() == 32);

CalcPressure doesn't exist.

Additionally,

REQUIRE(circle0.HasOverlap(circle_big) == false)

This is apparently True

I'm currently marking all failing tests with "BAD TEST" and commenting them out since I don't know if their behavior changes were intended.

@SensibleSalmon
Copy link
Collaborator Author

Author class was missing the constructor for only being given a last name; I added it.

@SensibleSalmon
Copy link
Collaborator Author

  • Change test maketarget to not run coverage things, make coverage run coverage things

@SensibleSalmon
Copy link
Collaborator Author

  • document dependencies (g++, lcov, gcov)

moved to another issue / downgraded in priority

if someone tries to run these and they explode, poke me

@mercere99
Copy link
Member

Hrrrm... maybe I'm not understanding what it means by "Line Coverage" vs. "Function Coverage". How can you have 100% Line Coverage, but less than 100% Function Coverage? More generally, some of those look better covered than I would have ever expected. ;-)

@SensibleSalmon
Copy link
Collaborator Author

Looks like that's where the coverage metrics run afoul of the
#ifdef/#define blocks. I'll have to experiment some.

One thing to keep track of is that though the code is covered it doesn't
necessarily have asserts keeping track of what it does--so we know it
doesn't explode when compiled/run, but we don't know if it runs correctly

But that's true of nearly all testing setups.

On Thu, Nov 5, 2015 at 7:19 PM Charles Ofria [email protected]
wrote:

Hrrrm... maybe I'm not understanding what it means by "Line Coverage" vs.
"Function Coverage". How can you have 100% Line Coverage, but less than
100% Function Coverage? More generally, some of those look better covered
than I would have ever expected. ;-)


Reply to this email directly or view it on GitHub
#12 (comment).

@SensibleSalmon
Copy link
Collaborator Author

dependency: gcovr
https://github.com/gcovr/gcovr/releases

Nope, nevermind

@SensibleSalmon
Copy link
Collaborator Author

Alright, current difficulty: finding a good way to see if test coverage has dropped/changed/code was added that's not covered.

That might be an issue I just table for now and hammer on later.

@SensibleSalmon
Copy link
Collaborator Author

@mercere99 Ready for merge at your leisure

@SensibleSalmon
Copy link
Collaborator Author

(the 12k deleted files are from where I forgot to not include the doc/build directory in commits and I deleted them, if you're wondering. gitignore and make clean have been updated accordingly)

mercere99 added a commit that referenced this pull request Nov 7, 2015
@mercere99 mercere99 merged commit 584a877 into master Nov 7, 2015
@SensibleSalmon SensibleSalmon deleted the feature/catch branch May 19, 2016 14:36
SensibleSalmon pushed a commit that referenced this pull request May 26, 2016
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