Skip to Main Content
Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson
book

Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson

by Aditya P. Mathur
May 2024
Intermediate to advanced content levelIntermediate to advanced
765 pages
21h 57m
English
Pearson India
Content preview from Foundations of Software Testing (Fundamental Algorithms and Techniques) by Pearson
Test-Adequacy Assessment Using Program Mutation
Example 7.39: Consider again the function trim from the book by
Kernighan and Ritchie.
/* This function is from page 65 of the book by Kernighan and
Ritchie. */
JOU USJN DIBS T < > 
4
\
JOUO F9
4
GPS O  TUSMFOT O >=  O−−
4
JGT<O>T<O>\ U  T <O> 
\ O
4
CSFBL
4
T<O >  \
4
SFUVSO O
^
The following two mutants are generated when trim is mutated using the
SMVB operator:
/* This is a mutant generated by the SMVB. In this one, the GPS loop
body extends to include the s [n+1] = ’\0’ statement. */
JOU USJN DIBS T < > 
\
JOU O
GPSOTUSMFOT O>O−−\ M20
JG T <O>     T <O>  \ U  T <O>  \ O
CSFBL
T<O>\ 
^
SFUVSO O
^
/* This is another mutant generated by the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Effective Software Testing, Video Edition

Effective Software Testing, Video Edition

Mauricio Aniche

Publisher Resources

ISBN: 9781299486720