#Programming #Cpp #AccuConf
Slides: https://accu.org/conf-previous/2021/s...
ACCU Website: https://www.accu.org
ACCU Conference Website: https://conference.accu.org
ACCU Twitter: @ACCUConf
Streamed & Edited By Digital Medium Ltd: https://events.digital-medium.co.uk
------
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: 1. int main() { 2. "hello world"_test = [] { // Running "hello world"…3. expect(12_i == fib(7)); // hello_world.cpp:3:FAILED [ 12 == 13 ] 4. }; // tests: 1 | 1 failed 5. } // asserts: 1 | 0 passed | 1 failed
The session will also focus on how to design modern testing facilities such as: * Sub/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) * Concepts * Source Location 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 ACCU 2020 and follow the Beyonce rule - "If you liked it then you should put a test on it".
[1]: https://github.com/boost-experimental/ut
------
Kris Jusiak
Kris is a Senior Software Engineer passionate about programming and who has worked in different industries over the years including telecommunications, games and most recently finance for Quantlab Financial, LLC. He has an interest in modern C development with a focus on performance and quality. He is an open-source enthusiast with multiple open-source libraries where he uses template meta-programming techniques to support the C rule - "Don’t pay for what you don’t use" whilst trying to be as declarative as possible with a help of domain-specific languages. Kris is also a keen advocate of extreme programming techniques, Test/Behavior Driven Development and truly believes that 'the only way to go fast is to go well!'.
------
Future Conferences:
ACCU 2022 Spring Conference, Bristol (UK), Marriott City Centre:
2022-04-05 to 2022-04-09.
-------------------------