do not click

Meeting C++ 2020   |  Online   |  Training   |  Survey   |  Advertising   |  Jobposting   |  Login

Meeting C++ online - Future of testing with C++20

Conference | Get your ticket | Sponsoring | Sponsored Tickets | Set your timezone

Kris Jusiak

Scheduled for 17:15

Slides: Future of testing with C++20

Testing in C++ is not easy, it requires a lot of boilerplate code, macro usage and/or understanding of complicated testing frameworks. But it doesn't have to be like that. C++20 will enable us to reinvent the way we write tests.
If taking a glance into the future of testing in C++ peaks your interest this session is for you.

In this case study, we will address the difficulty of testing with C++ by implementing a new,
fully functional, macro-free testing framework [1] from scratch with modern C++20 features.

The main goal will be to leverage modern C++ in order to make the following snippet compile and run:

01 import ut;
03 int main() {
04   "fib"_test = [] { // Running "fib"...
05     fib(7) == 12_i; // fib.cpp:5:FAILED [ 13 == 12 ]
06   };                // tests:   1 | 1 failed
07 }                   // asserts: 1 | 0 passed | 1 failed

The session will also focus on how to design modern testing facilities such as:

  • Case/Suite
  • Sections
  • Parameterized tests
  • Behaviour Driven Development (BDD)

At the end of this session, the audience will have a better understanding of C++20 features such as:

  • New additions to lambdas
  • User-Defined Literals (UDL)
  • Source Location
  • Concepts
  • Modules

As well as how and where to apply them.

Additionally, attendees will get familiar with a new, expressive way of testing with modern C++.

Let's get ready to test all the things at Meeting C++ 2020 and follow the Beyonce rule - "If you liked it then you "should put a"_test on it".


Please login to comment

Copyright Meetingcpp GmbH Imprint Piwik Opt out Privacy Policy