Skip to main content
Lesson Description Pre-Alpha This lesson is in the pre-alpha phase, which means that it is in early development, but has not yet been taught.
    Lesson Description
    C++ Unit Testing for Theoretical and Experimental Particle Physics
    • C++ Unit Testing for Theoretical and Experimental Particle Physics
    • Key Points
    • Glossary
    • Learner Profiles
      • Reference
    Search the All In One page
  • Instructor View
    Summary and Setup
    1. What is unit testing?
    2. Organizing code to enable unit testing
    3. Unit testing with assert()
    4. Integrating tests into a build system
    5. Introducing GoogleTest
    6. Floating point comparisons
    7. Testing exceptional behaviour
    8. Testing stateful classes
    9. Test fixtures
    10. Code coverage
    11. Sanitizers as another line of defence

    • Key Points
    • Glossary
    • Learner Profiles
    • Reference

    See all in one page

    All Images

    What is unit testing?


    Organizing code to enable unit testing


    Unit testing with assert()


    Integrating tests into a build system


    Introducing GoogleTest


    Floating point comparisonsTesting with floating point numbers


    Testing exceptional behaviour


    Testing stateful classes


    Test fixtures


    Code coverage


    Figure 1


    Figure 2


    Sanitizers as another line of defenceCode Sanitizers



    This lesson is subject to the Code of Conduct

    Edit on GitHub | Contributing | Source

    Cite | Contact | About

    Materials licensed under CC-BY 4.0 by the authors

    Template licensed under CC-BY 4.0 by The Carpentries

    Built with sandpaper (0.20.2), pegboard (0.7.9), and varnish (1.1.1)


    Back To Top