Pass options only to jobs that need them.
[dcpomatic.git] / test / test.cc
index 468e6c1fddcfd37da4920f7bf3085ee88e65c47c..5aed18c523043512729a14533c85fbb9ccc56350 100644 (file)
@@ -426,8 +426,8 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
 class TestJob : public Job
 {
 public:
-       TestJob (shared_ptr<const FilmState> s, shared_ptr<const Options> o, Log* l, shared_ptr<Job> req)
-               : Job (s, o, l, req)
+       TestJob (shared_ptr<const FilmState> s, Log* l, shared_ptr<Job> req)
+               : Job (s, l, req)
        {
 
        }
@@ -457,11 +457,10 @@ public:
 BOOST_AUTO_TEST_CASE (job_manager_test)
 {
        shared_ptr<const FilmState> s;
-       shared_ptr<const Options> o;
        FileLog log ("build/test/job_manager_test.log");
 
        /* Single job, no dependency */
-       shared_ptr<TestJob> a (new TestJob (s, o, &log, shared_ptr<Job> ()));
+       shared_ptr<TestJob> a (new TestJob (s, &log, shared_ptr<Job> ()));
 
        JobManager::instance()->add (a);
        dvdomatic_sleep (1);
@@ -471,8 +470,8 @@ BOOST_AUTO_TEST_CASE (job_manager_test)
        BOOST_CHECK_EQUAL (a->finished_ok(), true);
 
        /* Two jobs, dependency */
-       a.reset (new TestJob (s, o, &log, shared_ptr<Job> ()));
-       shared_ptr<TestJob> b (new TestJob (s, o, &log, a));
+       a.reset (new TestJob (s, &log, shared_ptr<Job> ()));
+       shared_ptr<TestJob> b (new TestJob (s, &log, a));
 
        JobManager::instance()->add (a);
        JobManager::instance()->add (b);
@@ -488,8 +487,8 @@ BOOST_AUTO_TEST_CASE (job_manager_test)
        BOOST_CHECK_EQUAL (b->finished_ok(), true);
 
        /* Two jobs, dependency, first fails */
-       a.reset (new TestJob (s, o, &log, shared_ptr<Job> ()));
-       b.reset (new TestJob (s, o, &log, a));
+       a.reset (new TestJob (s, &log, shared_ptr<Job> ()));
+       b.reset (new TestJob (s, &log, a));
 
        JobManager::instance()->add (a);
        JobManager::instance()->add (b);