1.2.2. Expectation List

Sometimes you have not only a single value but a series of values. For this purpose you set up a list of expectations of the same type. The next example creates an expectation list for int values. The list members are compared with the actual values one after the other in exactly the same order they were inserted.


  ExpectationList <int> el ("verifyValue", 0);

  el.addExpected(1);
  el.addExpected(2);
  el.addExpected(3);

  el.addActual(1);
  el.addActual(2);
  el.addActual(3);