From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2006-02-03 03:37:44
Gennadiy Rozental wrote:
>> Anyway, you caught my attention. I checked the mock_object.hpp
>> header and also found a couple of usage examples under the
>> 'examples' directory. What I was missing though, was examples of
>> setting up / checking the expectations - did I just miss something
>> or aren't they there (yet)?
> Did you check logged_exp_example.cpp?
I've checked it and just now rechecked it. It looks like it requires an
input file of type .elog, right?
Couldn't find that one on my local harddrive so the test kept failing - is
there an option to generate this from a known good scenario, or what?
Are there any other methods for settings up the expectations
programmatically? Like (contrived pseudo-code example, never mind my cooking
const int Temperature = Stove::MaxTemp;
const int NoOfEggs = 12;
f.expect_call(Fridge::get_food, "eggs", NoOfEggs);
s.expect_call(Stove::on, Temperature, Stove::WaitUntilReady);
t.expect_call(Timer::wait, minutes(12) );
... etc ...
<somehow setup the combined call sequence>
KitchenRobot kr(f, s, t);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk