michael-herbst.com Research and projects

michael-herbst.com
  • Blog
    • Recent articles
    • Article archives
  • Research
    • Collaborations
    • Software / DFTK / adcc
    • Reliable and efficient DFT
    • Robust error control / algorithmic differentiation
    • Core-excited states
  • Publications
  • Upcoming
  • Curriculum Vitae
  • Teaching
    • Mathematical Aspects of Computational Chemistry
    • RWTH Julia workshop 2022
    • Juliacon DFTK workshop 2021
    • All teaching resources
  • Contact

[c¼h] Testen mit Rapidcheck und Catch

Last Thursday, I gave another short talk at the Heidelberg Chaostreff NoName e.V. This time I talked about writing tests in C++ using the testing libraries rapidcheck and Catch.

In the talk I presented some ideas how to incorporate property-based testing into test suites for C++ programs. The idea of property-based testing originates from the Haskell library QuickCheck, which tries to use properties of the input data and of properties of the output data in order to generate random test cases for a code unit. So instead of testing a piece of code with just a small number of static tests, which are the same for each run of the test suite, we test with randomly seeded data. Additionally, if a test fails, QuickCheck/rapidcheck automatically simplifies the test case in order to find the simplest input, which yields a failing test. This of cause eases finding the underlying bug massively.

Since this was our first Treff in the new Mathematikon building, the University just opened recently, we had a few technical difficulties with our setup. As a result there is no recording of my talk available this time, unfortunately. The example code I used during the presentation, however, is available on github. It contains a couple of buggy classes and functions and a Catch based test program, which can be used to find these bugs.

Posted on Mo 14 März 2016 in Chaos.

Tags: talk NoName C++ testing and programming and scripting

Social

  • Blog articles (Atom)
  • github.com/mfherbst
  • 0000-0003-0378-7921
  • arXiv.org preprints

Recent publications

  • Efficient response property calculations in DFT
  • Surrogate models for quantum spin systems
  • QCDB / QCEngine
  • Adaptive damping for SCFs
  • Q-Chem 5 paper
  • Full list of publications ...

Recent talks

  • GdR nbody meeting
  • GdR REST ML discussion
  • VMD 2021: Black-box DFT methods
  • Full list of talks ...

Recent teaching

  • DFTK workshop: Mathematics and numerics of density-functional theory
  • Mathematical Aspects of Computational Chemistry
  • An introduction to the Julia programming language
  • Full list of teaching ...

Blog categories

  • Chaos
  • Publications
  • Research
  • System Administration
  • Teaching
  • Uncategorised

    Blog tags

  • adcc
  • algebraic-diagrammatic construction
  • computer science
  • convergence
  • Coulomb Sturmians
  • DFT
  • DFTK
  • electronic structure theory
  • high-throughput
  • HPC
  • invited talk
  • Julia
  • Kohn-Sham
  • lazy matrices
  • numerical analysis
  • programming and scripting
  • solid state
  • talk
  • theoretical chemistry
  • workshop
Powered by pelican, python and Jinja2.