From 56b4e070b9a9fcd69df75d778dc04ee9a429c087 Mon Sep 17 00:00:00 2001 From: Christian Kern Date: Thu, 22 Oct 2015 13:06:14 +0200 Subject: [PATCH] Merged commits 63e41b4e940e6b99ec0139ea67bedb141098da78 0382e892b48079fe6526bb28d5b030a51dea6903 0e72ebd69b99fe129bd6260cfeb1304fec053b68 8c8de08416219431e9a7eadadabfd13323c15fd7 as mainly only containing do/undo formatting --- tasks_cpp/test/tasks_cpp_test_task.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tasks_cpp/test/tasks_cpp_test_task.cc b/tasks_cpp/test/tasks_cpp_test_task.cc index 103098d..1c51631 100644 --- a/tasks_cpp/test/tasks_cpp_test_task.cc +++ b/tasks_cpp/test/tasks_cpp_test_task.cc @@ -78,13 +78,19 @@ void TaskTest::TestBasic() { PT_EXPECT_EQ(policy.GetPriority(), 0u); policy.AddWorker(0u); PT_EXPECT_EQ(policy.GetAffinity(), 1u); - policy.AddWorker(1u); - PT_EXPECT_EQ(policy.GetAffinity(), 3u); + + if (policy.GetCoreCount() > 1) { + policy.AddWorker(1u); + PT_EXPECT_EQ(policy.GetAffinity(), 3u); + } + policy.RemoveWorker(0u); - PT_EXPECT_EQ(policy.GetAffinity(), 2u); PT_EXPECT_EQ(policy.IsSetWorker(0), false); - PT_EXPECT_EQ(policy.IsSetWorker(1), true); + if (policy.GetCoreCount() > 1) { + PT_EXPECT_EQ(policy.GetAffinity(), 2u); + PT_EXPECT_EQ(policy.IsSetWorker(1), true); + } std::string test; embb::tasks::Task task = node.Spawn( embb::base::Bind( -- libgit2 0.26.0