|
===========================================================================
= Cantata++ Test Harness v1.0 (c) 1996 IPL Information Processing Ltd =
=-------------------------------------------------------------------------=
= Test Description: stack =
= Test Started: Thu Feb 05 10:54:58 1998 =
===========================================================================
------------------------- Start Test: Empty stack
Test the default constructor, is_empty() and pop on an empty stack
Start Call Sequence Validation:
Expected calls: {operator new#normal}
Start Exception Block:
PASSED: Check: ? stack1.is_empty() = true
value: 1
PASSED: Expected Exception: stack::empty_pop
End Exception Block
End Call Sequence Validation:
------------------------- End Test: Empty stack
------------------------- Start Test: Push/pop
Test the push and pop member functions
Start Call Sequence Validation:
Expected calls: {operator new#normal}
Start Exception Block:
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Check: ? stack1.is_empty() = false
value: 0
PASSED: Check: ? stack1.pop() = 1
value: 1
PASSED: Check: ? stack1.pop() = 2
value: 2
PASSED: Check: ? stack1.pop() = 3
value: 3
PASSED: Check: ? stack1.is_empty() = true
value: 1
PASSED: No Exceptions
End Exception Block
End Call Sequence Validation:
------------------------- End Test: Push/pop
------------------------- Start Test: Copy constructor
Test the copy constructor: check the head pointers then pop from the copy
Start Call Sequence Validation:
Expected calls: {operator new#normal}
Start Exception Block:
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Function: operator new
PASSED: Instance: normal
PASSED: Check: ? stack1.head != stack2.head = true
value: 1
PASSED: Check: ? stack2.pop() = 1
value: 1
PASSED: Check: ? stack2.pop() = 2
value: 2
PASSED: Check: ? stack2.pop() = 3
value: 3
PASSED: No Exceptions
End Exception Block
End Call Sequence Validation:
------------------------- End Test: Copy constructor
------------------------- Start Test: Out of memory
Wrapper on call to 'new' to force out of memory error return
Start Call Sequence Validation:
Expected calls: operator new#outofmem
Start Exception Block:
PASSED: Function: operator new
PASSED: Instance: outofmem
PASSED: Expected Exception: stack::new_error
End Exception Block
End Call Sequence Validation:
------------------------- End Test: Out of memory
Set Log Level: Detailed
GET_COVERAGE_MIN: entry point coverage (feasible only, non catch clauses only)
for "stack::*" in context "*" = 100.0%
PASSED: Check: minimum 100% entry-point coverage
value: 100
Coverage results for entry point,
for "stack::*" in context "*"
feasible only, non catch clauses only
-----------------------------------------------------------------------------
stack.cpp(66):stack::is_empty()
"stack::is_empty" entry point 100.0%
stack.cpp(96):stack::pop()
"stack::pop" entry point 100.0%
stack.cpp(74):stack::push(int )
"stack::push" entry point 100.0%
stack.cpp(20):stack::stack()
"stack::stack" entry point 100.0%
stack.cpp(28):stack::stack(const stack &)
"stack::stack" entry point 100.0%
stack.cpp(53):stack::~stack()
"stack::~stack" entry point 100.0%
Summary by EXECUTED Overall Statistics
Coverage type INFEASIBLES (wavg) avg / min / max / dev / num
-----------------------------------------------------------------------------
entry point 0 100.0% 100.0% / 100.0% / 100.0% / 0.0% / 6
GET_COVERAGE_MIN: statement coverage (feasible only, non catch clauses only)
for "stack::*" in context "*" = 100.0%
PASSED: Check: minimum 100% statement coverage
value: 100
GET_COVERAGE_MIN: decision coverage (feasible only, non catch clauses only)
for "stack::*" in context "*" = 100.0%
PASSED: Check: minimum 100% decision coverage
value: 100
Coverage results for statement, decision,
for "stack::*" in context "*"
with executed and un-executed details
feasible only, non catch clauses only
-----------------------------------------------------------------------------
stack.cpp(66):stack::is_empty()
statement coverage details (with executed and un-executed cases)
stack.cpp(67): stmnt 1 (return) 10
"stack::is_empty" executed 1
"stack::is_empty" un-executed 0
"stack::is_empty" statement coverage details 100.0%
stack.cpp(96):stack::pop()
statement coverage details (with executed and un-executed cases)
stack.cpp(97): stmnt 1 (cond) 7
stack.cpp(99): stmnt 2 (other) 1
stack.cpp(102): stmnt 3 (declaration) 6
stack.cpp(103): stmnt 4 (declaration) 6
stack.cpp(104): stmnt 5 (other) 6
stack.cpp(105): stmnt 6 (other) 6
stack.cpp(107): stmnt 7 (return) 6
"stack::pop" executed 7
"stack::pop" un-executed 0
"stack::pop" statement coverage details 100.0%
stack.cpp(74):stack::push(int )
statement coverage details (with executed and un-executed cases)
stack.cpp(76): stmnt 1 (other) 10
stack.cpp(78): stmnt 2 (cond) 10
stack.cpp(80): stmnt 3 (other) 9
stack.cpp(81): stmnt 4 (other) 9
stack.cpp(82): stmnt 5 (other) 9
stack.cpp(86): stmnt 6 (other) 1
stack.cpp(89): stmnt 7 (return) 9
"stack::push" executed 7
"stack::push" un-executed 0
"stack::push" statement coverage details 100.0%
stack.cpp(20):stack::stack()
statement coverage details (with executed and un-executed cases)
stack.cpp(21): stmnt 1 (other) 4
"stack::stack" executed 1
"stack::stack" un-executed 0
"stack::stack" statement coverage details 100.0%
stack.cpp(28):stack::stack(const stack &)
statement coverage details (with executed and un-executed cases)
stack.cpp(29): stmnt 1 (other) 1
stack.cpp(31): stmnt 2 (declaration) 1
stack.cpp(32): stmnt 3 (loop) 1
stack.cpp(34): stmnt 4 (other) 3
stack.cpp(35): stmnt 5 (other) 3
stack.cpp(38): stmnt 6 (other) 1
stack.cpp(40): stmnt 7 (declaration) 1
stack.cpp(41): stmnt 8 (loop) 1
stack.cpp(43): stmnt 9 (other) 3
stack.cpp(44): stmnt 10 (other) 3
stack.cpp(45): stmnt 11 (other) 3
"stack::stack" executed 11
"stack::stack" un-executed 0
"stack::stack" statement coverage details 100.0%
stack.cpp(53):stack::~stack()
statement coverage details (with executed and un-executed cases)
stack.cpp(54): stmnt 1 (loop) 5
stack.cpp(56): stmnt 2 (declaration) 3
stack.cpp(57): stmnt 3 (other) 3
stack.cpp(58): stmnt 4 (other) 3
"stack::~stack" executed 4
"stack::~stack" un-executed 0
"stack::~stack" statement coverage details 100.0%
stack.cpp(66):stack::is_empty()
decision coverage details (with executed and un-executed cases)
"stack::is_empty" executed 0
"stack::is_empty" un-executed 0
"stack::is_empty" decision coverage details 100.0%
stack.cpp(96):stack::pop()
decision coverage details (with executed and un-executed cases)
stack.cpp(97): decn 1 (if) branch TRUE 1
stack.cpp(97): decn 1 (if) branch FALSE 6
"stack::pop" executed 2
"stack::pop" un-executed 0
"stack::pop" decision coverage details 100.0%
stack.cpp(74):stack::push(int )
decision coverage details (with executed and un-executed cases)
stack.cpp(78): decn 1 (if) branch TRUE 9
stack.cpp(78): decn 1 (if) branch FALSE 1
"stack::push" executed 2
"stack::push" un-executed 0
"stack::push" decision coverage details 100.0%
stack.cpp(20):stack::stack()
decision coverage details (with executed and un-executed cases)
"stack::stack" executed 0
"stack::stack" un-executed 0
"stack::stack" decision coverage details 100.0%
stack.cpp(28):stack::stack(const stack &)
decision coverage details (with executed and un-executed cases)
stack.cpp(32): decn 1 (while) branch TRUE 3
stack.cpp(32): decn 1 (while) branch FALSE 1
stack.cpp(41): decn 2 (while) branch TRUE 3
stack.cpp(41): decn 2 (while) branch FALSE 1
"stack::stack" executed 4
"stack::stack" un-executed 0
"stack::stack" decision coverage details 100.0%
stack.cpp(53):stack::~stack()
decision coverage details (with executed and un-executed cases)
stack.cpp(54): decn 1 (while) branch TRUE 3
stack.cpp(54): decn 1 (while) branch FALSE 5
"stack::~stack" executed 2
"stack::~stack" un-executed 0
"stack::~stack" decision coverage details 100.0%
Summary by EXECUTED Overall Statistics
Coverage type INFEASIBLES (wavg) avg / min / max / dev / num
-----------------------------------------------------------------------------
statement 0 100.0% 100.0% / 100.0% / 100.0% / 0.0% / 6
decision 0 100.0% 100.0% / 100.0% / 100.0% / 0.0% / 6
===========================================================================
= Test Finished: Thu Feb 05 10:54:59 1998 =
=-------------------------------------------------------------------------=
= Test Script Checks Checks Checks Call Seq TEST =
= Case Errors Failed Passed Warned Failures RESULT =
=-------------------------------------------------------------------------=
= Empty stack 0 0 2 0 0 PASS =
= Push/pop 0 0 6 0 0 PASS =
= Copy constructor 0 0 5 0 0 PASS =
= Out of memory 0 0 1 0 0 PASS =
= Other 0 0 3 0 0 PASS =
=-------------------------------------------------------------------------=
= TOTALS 0 0 17 0 0 PASS =
===========================================================================
|