Style fixes.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-05-31 16:40:33 +02:00
parent b7f1812153
commit bfe1fcc805
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
4 changed files with 20 additions and 20 deletions

View File

@ -1,5 +1,4 @@
#include "ConstString.hpp"
ArbUt::__ConstStringCharHolder* ArbUt::CaseInsensitiveConstString::__emptyString =
new __ConstStringCharHolder("", 0);
ArbUt::__ConstStringCharHolder* ArbUt::CaseInsensitiveConstString::__emptyString = new __ConstStringCharHolder("", 0);
ArbUt::__ConstStringCharHolder* ArbUt::ConstString::__emptyString = new __ConstStringCharHolder("", 0);

View File

@ -66,7 +66,6 @@ namespace ArbUt {
const std::vector<ValueT*>& GetStdList() const { return _vector; }
std::vector<ValueT*>& GetStdList() { return _vector; }
};
}

View File

@ -8,7 +8,7 @@
#endif
#define ConstStringCore(name, hashFunction) \
namespace ArbUt { \
namespace ArbUt { \
class name { \
private: \
__ConstStringCharHolder* _str; \
@ -112,11 +112,11 @@
} \
\
namespace std { \
template <> struct hash<ArbUt::name> { \
constexpr std::size_t operator()(ArbUt::name const& s) const noexcept { return s.GetHash(); } \
template <> struct hash<ArbUt::name> { \
constexpr std::size_t operator()(ArbUt::name const& s) const noexcept { return s.GetHash(); } \
}; \
template <> struct hash<ArbUt::name##_Literal> { \
constexpr std::size_t operator()(ArbUt::name##_Literal const& s) const noexcept { return s.GetHash(); } \
template <> struct hash<ArbUt::name##_Literal> { \
constexpr std::size_t operator()(ArbUt::name##_Literal const& s) const noexcept { return s.GetHash(); } \
}; \
}

View File

@ -3,18 +3,18 @@
#include "../src/Memory/UniquePtrList.hpp"
using namespace ArbUt;
TEST_CASE("Create Unique Ptr list, append"){
TEST_CASE("Create Unique Ptr list, append") {
auto ls = UniquePtrList<uint32_t>();
auto v1 = new uint32_t (100);
auto v2 = new uint32_t (5000);
auto v1 = new uint32_t(100);
auto v2 = new uint32_t(5000);
ls.Append(v1);
ls.Append(v2);
}
TEST_CASE("Create Unique Ptr list, append, retrieve"){
TEST_CASE("Create Unique Ptr list, append, retrieve") {
auto ls = UniquePtrList<uint32_t>();
auto v1 = new uint32_t (100);
auto v2 = new uint32_t (5000);
auto v1 = new uint32_t(100);
auto v2 = new uint32_t(5000);
ls.Append(v1);
ls.Append(v2);
REQUIRE(ls.Count() == 2);
@ -24,17 +24,19 @@ TEST_CASE("Create Unique Ptr list, append, retrieve"){
CHECK(ls[1] == v2);
}
TEST_CASE("Create Unique Ptr list, append, iterate"){
TEST_CASE("Create Unique Ptr list, append, iterate") {
auto ls = UniquePtrList<uint32_t>();
auto v1 = new uint32_t (100);
auto v2 = new uint32_t (5000);
auto v1 = new uint32_t(100);
auto v2 = new uint32_t(5000);
ls.Append(v1);
ls.Append(v2);
REQUIRE(ls.Count() == 2);
auto i = 0;
for (const auto& v : ls){
if (i == 0) CHECK(v == v1);
else if (i == 1) CHECK(v == v2);
for (const auto& v : ls) {
if (i == 0)
CHECK(v == v1);
else if (i == 1)
CHECK(v == v2);
i++;
}
}