|
ABSTRACT
Modern development practises encourage extensive testing of code while it is still under development, using unit tests to check individual code units in isolation. Such tests are typically case-based, checking a likely error scenario or an error that has previously been identified and fixed. Coming up with good test cases is challenging, and focusing on individual tests can distract from creating tests that cover the full functionality. Axioms, known from program specification, allow for an alternative way of generating test cases, where the intended functionality is described as rules or equations that can be checked automatically. Axioms are proposed as part of the concept feature of the upcoming C++0x standard. In this paper, we describe how tests may be generated automatically from axioms in C++ concepts, and supplied with appropriate test data to form effective automated unit tests.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
| |
2
|
|
 |
3
|
|
| |
4
|
|
| |
5
|
A. H. Bagge and M. Haveraaen. Interfacing concepts: Why declaration style shouldn't matter. In T. Ekman and J. J. Vinju, editors, Proceedings of the Ninth Workshop on Language Descriptions, Tools and Applications (LDTA '09), Electronic Notes in Theoretical Computer Science. Elsevier, York, UK, March 2009.
|
| |
6
|
K. Beck. Extreme programming: A humanistic discipline of software development. In Proceedings of the 1st International Conference on Fundamental Approaches to Software Engineering (FASE'98), pages 1--6. Springer Berlin / Heidelberg, 1998.
|
| |
7
|
|
| |
8
|
K. Beck and E. Gamma. JUnit -- Java Unit testing. http://www.junit.org and http://junit.sourceforge.net/ per 2007-03-15.
|
| |
9
|
P. Becker. Working draft, standard for programming language C++. Technical Report N2857=09-0047, JTC1/SC22/WG21 -- The C++ Standards Committee, March 23rd, 2009.
|
 |
10
|
|
 |
11
|
|
 |
12
|
|
 |
13
|
|
 |
14
|
|
| |
15
|
|
 |
16
|
Roong-Ko Doong , Phyllis G. Frankl, Case studies on testing object-oriented programs, Proceedings of the symposium on Testing, analysis, and verification, p.165-177, October 08-10, 1991, Victoria, British Columbia, Canada
[doi> 10.1145/120807.120822]
|
 |
17
|
|
 |
18
|
John Gannon , Paul McMullin , Richard Hamlet, Data Abstraction, Implementation, Specification, and Testing, ACM Transactions on Programming Languages and Systems (TOPLAS), v.3 n.3, p.211-223, July 1981
[doi> 10.1145/357139.357140]
|
| |
19
|
|
| |
20
|
M.-C. Gaudel and P. L. Gall. Testing data types implementations from algebraic specifications. In Formal Methods and Testing, volume 4949 of Lecture Notes in Computer Science, pages 209--239. Springer, 2008.
|
| |
21
|
J. Goguen, J. Thatcher, and E. Wagner. An initial algebra approach to the specification, correctness and implementation of abstract data types. In R. Yeh, editor, Current Trends in Programming Methodology, volume 4, pages 80--149. Prentice Hall, 1978.
|
| |
22
|
P. Gottschling. Fundamental algebraic concepts in concept-enabled C++. Technical Report TR639, Department of Computer Science, Indiana University, 2006.
|
 |
23
|
Douglas Gregor , Jaakko Järvi , Jeremy Siek , Bjarne Stroustrup , Gabriel Dos Reis , Andrew Lumsdaine, Concepts: linguistic support for generic programming in C++, Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
[doi> 10.1145/1167473.1167499]
|
| |
24
|
D. Gregor and A. Lumsdaine. Core concepts for the C++0x standard library (revision 2). Technical Report N2621=08-0131, JTC1/SC22/WG21 -- The C++ Standards Committee, May 19th, 2008.
|
| |
25
|
|
| |
26
|
|
| |
27
|
J. V. Guttag and J. J. Horning. The algebraic specification of abstract data types. Acta Inf., 10:27--52, 1978.
|
 |
28
|
|
| |
29
|
|
| |
30
|
R. Hamlet. Random testing. In J. Marciniak, editor, Encyclopedia of Software Engineering, pages 970--978. Wiley, 1994.
|
| |
31
|
M. Haveraaen and E. Brkic. Structured testing in Sophus. In E. Coward, editor, Norsk informatikkonferanse NIK'2005, pages 43--54. Tapir akademisk forlag, Trondheim, Norway, 2005. URL http://www.nik.no/2005/.
|
| |
32
|
M. Haveraaen, H. A. Friis, and H. Munthe-Kaas. Computable scalar fields: a basis for PDE software. Journal of Logic and Algebraic Programming, 65(1):36--49, September-October 2005.
|
 |
33
|
|
 |
34
|
|
| |
35
|
K. T. Kalleberg. Abstractions for Language-Independent Program Transformations, chapter 11. University of Bergen, Norway, Postboks 7800, 5020 Bergen, Norway, June 2007. ISBN 978-82-308-0441-4.
|
 |
36
|
|
 |
37
|
|
| |
38
|
M. Masood, E. Birkenes, K. T. Kalleberg, M. Haveraaen, and A. H. Bagge. Axiom-based testing of Java collections with JAxT. Technical Report 388, Department of Informatics, University of Bergen, P.O.Box 7803, N-5020 Bergen, Norway, August 2009. URL http://www.ii.uib.no/publikasjoner/texrap/.
|
| |
39
|
I. S. W. B. Prasetya, T. E. J. Vos, and A. Baars. Trace-based reflexive testing of OO programs. Technical Report UU-CS-2007-037, Department of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands, 2007. URL http://www.cs.uu.nl/research/techreps/repo/CS-2007/2007-037.pdf.
|
 |
40
|
|
 |
41
|
|
| |
42
|
|
| |
43
|
P. Sommerlad. C++ Unit Testing Easier, 2009. URL http://r2.ifs.hsr.ch/cute.
|
| |
44
|
|
 |
45
|
|
| |
46
|
The Transformers Group, LRDE, EPITA. Transformers, 2008. URL http://www.lrde.epita.fr/cgi-bin/twiki/view/Transformers/Transformers.
|
| |
47
|
Bo Yu , Liang Kong , Yufeng Zhang , Hong Zhu, Testing Java Components based on Algebraic Specifications, Proceedings of the 2008 International Conference on Software Testing, Verification, and Validation, p.190-199, April 09-11, 2008
[doi> 10.1109/ICST.2008.39]
|
| |
48
|
|
INDEX TERMS
Primary Classification:
D.
Software
D.2
SOFTWARE ENGINEERING
D.2.5
Testing and Debugging
Subjects:
Testing tools (e.g., data generators, coverage testing)
Additional Classification:
D.
Software
D.1
PROGRAMMING TECHNIQUES
D.1.5
Object-oriented Programming
General Terms:
Design,
Languages,
Reliability
Keywords:
C++,
C++0x,
algebraic specification,
axiom-based testing,
axioms,
concepts,
generative programming,
mouldable programming,
program transformation,
test generation,
unit testing
|