Guest User

copy constructor error 01

a guest
Dec 3rd, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.16 KB | None | 0 0
  1. Output when using
  2. tailPtr = newPtr->next;
  3. // ------------------------------------------//
  4.  
  5. START OF TEST 4:
  6. Testing the copy constructor (2 points).
  7. Copy constructor test: for an empty Sequence.
  8. Testing that size() returns 0 ... Passed.
  9. Testing that is_item() returns false ... Passed.
  10. I'll call start() and look at the items one more time...
  11. All tests passed for this Sequence.
  12.  
  13. Copy constructor test: for a Sequence with cursor at tail.
  14. tail assigned
  15. Testing that size() returns 20 ... Passed.
  16. Testing that is_item() returns true ... Passed.
  17. The cursor should be at item [19] of the Sequence
  18. (counting the first item as [0]). I will advance the cursor
  19. to the end of the Sequence, checking that each item is correct...Passed.
  20. I'll call start() and look at the items one more time...
  21. The cursor should be at item [0] of the Sequence
  22. (counting the first item as [0]). I will advance the cursor
  23. to the end of the Sequence, checking that each item is correct...Passed.
  24. All tests passed for this Sequence.
  25.  
  26. Copy constructor test: with cursor near middle.
  27. // infinitely looping here
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Output when using
  34. tailPtr = newPtr;
  35. // ------------------------------------------//
  36. START OF TEST 4:
  37. Testing the copy constructor (2 points).
  38. Copy constructor test: for an empty Sequence.
  39. Testing that size() returns 0 ... Passed.
  40. Testing that is_item() returns false ... Passed.
  41. I'll call start() and look at the items one more time...
  42. All tests passed for this Sequence.
  43.  
  44. Copy constructor test: for a Sequence with cursor at tail.
  45. tail assigned
  46. Testing that size() returns 20 ... Passed.
  47. Testing that is_item() returns true ... Passed.
  48. The cursor should be at item [19] of the Sequence
  49. (counting the first item as [0]). I will advance the cursor
  50. to the end of the Sequence, checking that each item is correct...Passed.
  51. I'll call start() and look at the items one more time...
  52. The cursor should be at item [0] of the Sequence
  53. (counting the first item as [0]). I will advance the cursor
  54. to the end of the Sequence, checking that each item is correct...Passed.
  55. All tests passed for this Sequence.
  56.  
  57. Copy constructor test: with cursor near middle.
  58. Segmentation fault: 11
Advertisement
Add Comment
Please, Sign In to add comment