Code Monkey home page Code Monkey logo

Comments (2)

grahamboree avatar grahamboree commented on May 7, 2024

Another aspect to this we should consider: Once we have some unit tests, we should get them outputting gcov information when the game is built by the CI servers. This will allow us to use things like coveralls to measure code coverage.

Here's an example of a C++ project that has CI with Travis and Appveyor set up, along with unit tests using Catch and code coverage with coveralls. Their unit tests are all in one giant 10k line cpp file, which is less than ideal for sure, but is a good reference point when discussing how to structure our changes.

from recastnavigation.

hymerman avatar hymerman commented on May 7, 2024

Haha, we're going to get along well Graham :) This is something I was considering doing already.

My personal favourite unit test framework for C++ is UnitTest++ (https://github.com/unittest-cpp/unittest-cpp). I'd be perfectly happy with Catch or something else simple too though.

I'm not sure where in the repo they should live - each sub-project (Detour, DetourCrowd etc) is already in its own directory (which is nice), so either a completely parallel 'tests' directory or a 'tests' directory within each sub-project? And yes, easy to run is key - I make unit tests part of my build script. I'm sure we can get premake to run the tests.

Agreed on first things to test.

Also completely agreed on gcov or similar. Should be easy enough to work in. I've also got a long list of fun things I'd like to do with tests (fuzz testing, clang sanitizers etc).

I wonder what we should do with larger-scale functional tests? It would be nice to have automated tests that run through the whole process of building a navmesh, and/or pathfinding on it. Not as part of the unit test suite of course, but given the codebase's functional style it would be simple to use the same framework to write them and just include running them as an optional build target.

from recastnavigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.