/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <iostream>
#include <type_traits>
+#include <utility>
using Dali::Mutex;
using Dali::Thread;
}
DALI_TEST_EQUALS(false, mutex3.IsLocked(), TEST_LOCATION);
+ {
+ Mutex mutex4;
+ Mutex mutex5(std::move(mutex4)); // move constructor
+ Mutex::ScopedLock lock(mutex5);
+ DALI_TEST_EQUALS(true, mutex5.IsLocked(), TEST_LOCATION);
+ }
+
+ {
+ Mutex mutex4, mutex5;
+ mutex5 = std::move(mutex4); // move assignment
+ Mutex::ScopedLock lock(mutex5);
+ DALI_TEST_EQUALS(true, mutex5.IsLocked(), TEST_LOCATION);
+ }
+
END_TEST;
}