/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
DALI_TEST_EQUALS(observer1.GetActor(), nullptr, TEST_LOCATION);
DALI_TEST_EQUALS(observer2.GetActor(), nullptr, TEST_LOCATION);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Ensure self assignment doesn't change anything
observer1 = std::move(observer1);
observer2 = std::move(observer2);
DALI_TEST_EQUALS(observer1.GetActor(), nullptr, TEST_LOCATION);
DALI_TEST_EQUALS(observer2.GetActor(), nullptr, TEST_LOCATION);
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
END_TEST;
}
DALI_TEST_EQUALS(observer1.GetActor(), &actorImpl, TEST_LOCATION);
DALI_TEST_EQUALS(observer2.GetActor(), nullptr, TEST_LOCATION);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Self assignment
observer1 = std::move(observer1);
observer2 = std::move(observer2);
DALI_TEST_EQUALS(observer1.GetActor(), &actorImpl, TEST_LOCATION);
DALI_TEST_EQUALS(observer2.GetActor(), nullptr, TEST_LOCATION);
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
END_TEST;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
return s;
}
-} // namespace
-
-// Custom DALI_TEST_EQUALS for ConstString
-template<>
-inline void DALI_TEST_EQUALS<ConstString>(ConstString str1, ConstString str2, const char* location)
+// Custom << operator to print debugging log.
+std::basic_ostream<char>& operator<<(std::basic_ostream<char>& os, const ConstString& constString)
{
- DALI_TEST_EQUALS(str1.GetStringView(), str2.GetStringView(), location);
+ std::string convertedString = std::string(constString.GetStringView());
+ os << convertedString;
+ return os;
}
+} // namespace
+
void utc_dali_internal_indexed_conststring_map_startup(void)
{
test_return_value = TET_UNDEF;
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
DALI_TEST_CHECK(second.Get() == owned);
DALI_TEST_EQUALS(deleted, false, TEST_LOCATION);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Self assignment, nothing should change or be deleted.
first = std::move(first);
second = std::move(second);
DALI_TEST_CHECK(first.Get() == nullptr);
DALI_TEST_CHECK(second.Get() == owned);
DALI_TEST_EQUALS(deleted, false, TEST_LOCATION);
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
// Assign second to first, no deletion, second should have a nullptr now
first = std::move(second);
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/rendering/texture-set.h>
#include <dali/public-api/rendering/texture.h>
#include <set> // For std::multiset
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
DALI_TEST_ASSERTION(const_cast<const Property::Array&>(array1)[0], exceptionMessage);
DALI_TEST_ASSERTION(Property::Array temp; array1 = temp, exceptionMessage);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Self assignemnt
array2 = std::move(array2);
DALI_TEST_EQUALS(3u, array2.Size(), TEST_LOCATION); // still works, no debug assert
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
END_TEST;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
DALI_TEST_ASSERTION(const_cast<const Property::Map&>(map1)[0], exceptionMessage);
DALI_TEST_ASSERTION(Property::Map temp; map1 = temp, exceptionMessage);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Self assignment
map2 = std::move(map2);
DALI_TEST_EQUALS(3u, map2.Count(), TEST_LOCATION); // No debug assert as nothing should happen
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
END_TEST;
}
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
DALI_TEST_EQUALS(true, value2.Get(valueFloat), TEST_LOCATION); // Should be able to convert to a float now
DALI_TEST_EQUALS(valueFloat, 1.0f, TEST_LOCATION);
- // Self std::move assignment make compile warning over gcc-13. Let we ignore the warning.
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wself-move"
-#endif
// Ensure self assignment doesn't do anything silly
value2 = std::move(value2);
DALI_TEST_EQUALS(true, value2.Get(valueFloat), TEST_LOCATION);
DALI_TEST_EQUALS(valueFloat, 1.0f, TEST_LOCATION);
-#if (__GNUC__ >= 13)
-#pragma GCC diagnostic pop
-#endif
END_TEST;
}
#define DALI_ADDON_DISPATCH_TABLE_H
/*
- * Copyright (c) 2023 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 <dali/public-api/common/vector-wrapper.h>
#include <algorithm>
#include <string>
-#include <cstdint>
namespace Dali
{
#define DALI_RANDOM_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
// INTERNAL INCLUDES
#include <dali/public-api/math/vector4.h>
-
-// EXTERNAL INCLUDES
#include <algorithm>
-#include <ctime> ///< for time(nullptr)
namespace Dali
{