Commit 791aad2e authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Adapt unit test

parent 2c2067b0
...@@ -16,16 +16,10 @@ struct RavenWorkerInterfaceTest : testing::Test ...@@ -16,16 +16,10 @@ struct RavenWorkerInterfaceTest : testing::Test
{ {
std::unique_ptr<TestRavenWorkerInterface> interface; std::unique_ptr<TestRavenWorkerInterface> interface;
FieldOfDuty FOD;
RavenWorkerInterfaceTest ( ) RavenWorkerInterfaceTest ( )
{ {
auto config = CWorkerThread::WorkerThreadConfig::getDefaultWorkerThreadConfig ( ); auto config = CWorkerThread::WorkerThreadConfig::getDefaultWorkerThreadConfig ( );
FOD = FieldOfDuty::diffuseDecay;
config.SetValueInSubList ( "FieldOfDuty", "RavenWorkerThread", as_integer ( FOD ) );
interface = std::make_unique<TestRavenWorkerInterface> ( config, nullptr ); interface = std::make_unique<TestRavenWorkerInterface> ( config, nullptr );
} }
}; };
...@@ -47,10 +41,12 @@ TEST_F ( RavenWorkerInterfaceTest, update2Task ) ...@@ -47,10 +41,12 @@ TEST_F ( RavenWorkerInterfaceTest, update2Task )
EXPECT_EQ ( updateCopy.getID ( ), task->uiID ); EXPECT_EQ ( updateCopy.getID ( ), task->uiID );
EXPECT_EQ ( updateCopy.getReferenceID ( ), task->uiReferenceID ); EXPECT_EQ ( updateCopy.getReferenceID ( ), task->uiReferenceID );
EXPECT_EQ ( FOD, task->eSimulationType ); EXPECT_EQ ( FieldOfDuty::directSound, task->eSimulationType );
auto defaultConfig = CRavenConfig ( ); auto defaultConfig = CRavenConfig ( );
defaultConfig.setDefaults ( ); defaultConfig.setDefaults ( );
defaultConfig.oImageSource.iOrderPrimarySource = 0;
defaultConfig.oImageSource.iOrderSecondarySource = 0;
const auto difference = defaultConfig.compare ( task->oConfig ); const auto difference = defaultConfig.compare ( task->oConfig );
EXPECT_EQ ( CRavenConfig::DifferenceFlags::none, difference ); EXPECT_EQ ( CRavenConfig::DifferenceFlags::none, difference );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment