Testing by C++ template metaprograms

Testing is one of the most indispensable tasks in software en- gineering. The role of testing in software development has grown signi- cantly because testing is able to reveal defects in the code in an early stage of development. Many unit test frameworks compatible with C/C++ code exist, but a standard one is missing. Unfortunately, many unsolved problems can be mentioned with the existing methods, for example usu- ally external tools are necessary for testing C++ programs. In this paper we present a new approach for testing C++ programs. Our solution is based on C++ template metaprogramming facilities, so it can work with the standard-compliant compilers. The metaprogramming approach ensures that the overhead of testing is minimal at runtime. This approach also supports that the specication

[1]  Bjarne Stroustrup,et al.  The C++ Programming Language: Special Edition , 2000 .

[2]  Csaba Szabó Observations on incrementality principle within the test preparation process , .

[3]  Todd L. Veldhuizen,et al.  Expression templates , 1996 .

[4]  Naveneetha Vasudevan,et al.  Comparative Study of DSL Tools , 2011, WGT@ETAPS.

[5]  Norbert Pataki,et al.  ANALYSIS OF PROFILING TECHNIQUES FOR C++ TEMPLATE METAPROGRAMS , 2009 .

[6]  István Forgács,et al.  A New Concept of Effective Regression Test Generation in a C++ Specific Environment , 2008, Acta Cybern..

[7]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[8]  Paul Hamill Unit Test Frameworks , 2004 .

[9]  Krzysztof Czarnecki,et al.  DSL Implementation in MetaOCaml, Template Haskell, and C++ , 2003, Domain-Specific Program Generation.

[10]  Viktória Zsók,et al.  EClean - An Embedded Functional Language , 2009, Electron. Notes Theor. Comput. Sci..

[11]  Magne Haveraaen,et al.  Axiom-Based Transformations: Optimisation and Testing , 2009, Electron. Notes Theor. Comput. Sci..

[12]  Gergely Dévai,et al.  Meta programming on the proof level , 2022 .

[13]  Ábel Sinkovics,et al.  Domain-specific language integration with compile-time parser generator library , 2010, GPCE '10.

[14]  Zoltán Porkoláb,et al.  Debugging C++ template metaprograms , 2006, GPCE '06.

[15]  Björn Karlsson,et al.  Beyond the C++ Standard Library: An Introduction to Boost , 2005 .

[16]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[17]  Magne Haveraaen,et al.  The axioms strike back: testing with concepts and axioms in C++ , 2009, GPCE '09.

[18]  Keren Lenz,et al.  Simple and safe SQL queries with c++ templates , 2007, GPCE '07.

[19]  Joseph Gil,et al.  Simple and safe SQL queries with C++ templates , 2010, Sci. Comput. Program..

[20]  Norbert Pataki,et al.  Visualization of C++ Template Metaprograms , 2010, 2010 10th IEEE Working Conference on Source Code Analysis and Manipulation.

[21]  David Abrahams,et al.  C++ template metaprogramming , 2005 .

[22]  Andrei Alexandrescu,et al.  Modern C++ design: generic programming and design patterns applied , 2001 .