示例#1
0
    void TestFileFinderInterface() throw(Exception)
    {
        FileFinder base_file("global/test/data/random_data.txt",
                             RelativeTo::ChasteSourceRoot);
        FileFinder noised_file("global/test/data/same_random_data_with_1e-4_noise.txt",
                               RelativeTo::ChasteSourceRoot);

        FileComparison same_data(base_file, noised_file, CalledCollectively, SuppressOutput);
        TS_ASSERT_EQUALS(same_data.CompareFiles(0,false), expected_fail_result);
    }
void fileperblock_file<base_file_type>::serve(const request * req) throw (io_error)
{
    assert(req->get_file() == this);

    base_file_type base_file(filename_for_block(req->get_offset()), mode, get_queue_id());
    base_file.set_size(req->get_size());

    request_ptr derived(new serving_request(default_completion_handler(), &base_file, req->get_buffer(), 0, req->get_size(), req->get_type()));
    request_ptr dummy = derived;
    derived->serve();
}