From 23351f30484de3028cedaee0e2e0998d26180e92 Mon Sep 17 00:00:00 2001 From: uselessgoddess Date: Wed, 7 Jul 2021 16:45:20 +0300 Subject: [PATCH] [C++] 0.1.2 conanfile.txt - is full CMakeLists.txt - is full --- cpp/CMakeLists.txt | 2 +- cpp/Platform.Ranges.Tests/RangeTests.cpp | 4 ++-- cpp/Platform.Ranges/Platform.Ranges.TemplateLibrary.nuspec | 4 ++-- cpp/Platform.Ranges/Platform.Ranges.h | 2 +- cpp/Platform.Ranges/Range[T].h | 4 ++-- cpp/conanfile.txt | 1 + 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 5928ce1..f44fcf2 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -5,9 +5,9 @@ conan_basic_setup(TARGETS) add_library(${PROJECT_NAME}.Library INTERFACE) target_include_directories(${PROJECT_NAME}.Library INTERFACE ${PROJECT_NAME}) -target_link_libraries(${PROJECT_NAME}.Library INTERFACE CONAN_PKG::platform.delegates) target_link_libraries(${PROJECT_NAME}.Library INTERFACE CONAN_PKG::platform.converters) target_link_libraries(${PROJECT_NAME}.Library INTERFACE CONAN_PKG::platform.exceptions) +target_link_libraries(${PROJECT_NAME}.Library INTERFACE CONAN_PKG::platform.hashing) add_executable(${PROJECT_NAME}.Tests ${PROJECT_NAME}.Tests/AllTests.cpp) target_link_libraries(${PROJECT_NAME}.Tests PRIVATE ${PROJECT_NAME}.Library) diff --git a/cpp/Platform.Ranges.Tests/RangeTests.cpp b/cpp/Platform.Ranges.Tests/RangeTests.cpp index f15307a..d8531a8 100644 --- a/cpp/Platform.Ranges.Tests/RangeTests.cpp +++ b/cpp/Platform.Ranges.Tests/RangeTests.cpp @@ -24,13 +24,13 @@ TEST(RangesTests, DifferenceTest) { auto range = Range(1, 3); - //ASSERT_EQ(2, Platform::Ranges::RangeExtensions::Difference(range)); + ASSERT_EQ(2, Platform::Ranges::Difference(range)); } TEST(RangesTests, ToStringTest) { auto range = Range(1, 3); - //ASSERT_EQ("[1, 3]", Platform::Converters::To(range).data()); + ASSERT_EQ("[1, 3]", Platform::Converters::To(range)); } TEST(RangesTests, EqualityTest) diff --git a/cpp/Platform.Ranges/Platform.Ranges.TemplateLibrary.nuspec b/cpp/Platform.Ranges/Platform.Ranges.TemplateLibrary.nuspec index 0a7c189..5ed076a 100644 --- a/cpp/Platform.Ranges/Platform.Ranges.TemplateLibrary.nuspec +++ b/cpp/Platform.Ranges/Platform.Ranges.TemplateLibrary.nuspec @@ -5,8 +5,8 @@ LinksPlatform's Platform.Ranges Template Library LinksPlatform's Platform.Ranges is a Template Library what contains non-abstract class templates. LinksPlatform's Platform.Ranges is a Template Library what contains set of C++ non-abstract class templates. Use Platform.Ranges.h file to include the library. - Changed C++ standard from C++03 to C++20 - 0.1.1 + Changed C++ standard from C++03 to C++20. + 0.1.2 Konstantin Diachenko Konstantin Diachenko Konstantin Diachenko diff --git a/cpp/Platform.Ranges/Platform.Ranges.h b/cpp/Platform.Ranges/Platform.Ranges.h index 97e3ccd..aec5b37 100644 --- a/cpp/Platform.Ranges/Platform.Ranges.h +++ b/cpp/Platform.Ranges/Platform.Ranges.h @@ -8,7 +8,7 @@ #include #include #include -//#include +#include #include "Range[T].h" #include "Range.h" diff --git a/cpp/Platform.Ranges/Range[T].h b/cpp/Platform.Ranges/Range[T].h index 47f333c..c2bda76 100644 --- a/cpp/Platform.Ranges/Range[T].h +++ b/cpp/Platform.Ranges/Range[T].h @@ -33,7 +33,7 @@ public: constexpr Range(T minimum, T maximum) : Minimum(std::move(minimum)), Maximum(std::move(maximum)) { - if (minimum > maximum) // for constexpr + if (minimum > maximum) // for constexpr support { Always::MaximumArgumentIsGreaterOrEqualToMinimum(minimum, maximum, "maximum"); } @@ -51,7 +51,7 @@ public: constexpr explicit operator std::tuple() const noexcept { return { Minimum, Maximum }; } - public: constexpr explicit Range(std::tuple tuple) : Range(std::get<0>(tuple), std::get<1>(tuple)) noexcept { } + public: constexpr explicit Range(std::tuple tuple) noexcept : Range(std::get<0>(tuple), std::get<1>(tuple)) { } // TODO: @Voider extension template requires std::convertible_to diff --git a/cpp/conanfile.txt b/cpp/conanfile.txt index 1b4ed77..1d09bf3 100644 --- a/cpp/conanfile.txt +++ b/cpp/conanfile.txt @@ -3,6 +3,7 @@ gtest/cci.20210126 platform.exceptions/0.1.0 platform.converters/0.1.0 platform.delegates/0.1.3 +platform.hashing/0.1.0 [generators] cmake