diff --git a/design-linked-list/xmake.lua b/design-linked-list/xmake.lua index 1c3ce6ff..25099acf 100644 --- a/design-linked-list/xmake.lua +++ b/design-linked-list/xmake.lua @@ -1,11 +1,10 @@ if is_mode("test") then add_requires("vcpkg::eventpp") end add_rules("mode.debug", "mode.release") set_languages('cxx20') -add_requires("vcpkg::gtest") +add_requires("vcpkg::gtest") target("design-linked-list") set_kind("static") - add_files("*.ixx", {install = true}) if is_mode("test") then add_defines("__TEST__") diff --git a/split-a-circular-linked-list/test.cpp b/split-a-circular-linked-list/test.cpp index 7a22de8a..233f8e1c 100644 --- a/split-a-circular-linked-list/test.cpp +++ b/split-a-circular-linked-list/test.cpp @@ -17,28 +17,31 @@ using namespace leetcode_test::split_a_circular_linked_list; using namespace std; using std::vector; template -concept sizable = requires(T& t) { +concept sizable = requires(T& t) +{ { t.size() - } -> std::same_as; + } -> std::same_as; }; template -concept iterable = requires(T& t) { +concept iterable = requires(T& t) +{ ++t.begin(); { t.begin() != t.end() - } -> std::same_as; + } -> std::same_as; }; template -concept equalable = requires(T& t, Y& y, size_t i) { +concept equalable = requires(T& t, Y& y, size_t i) +{ { *t.begin() == *y.begin() - } -> std::same_as; + } -> std::same_as; }; template - requires sizable and sizable and equalable and iterable and iterable +requires sizable and sizable and equalable and iterable and iterable auto assertContentEquals(T& left, Y& right) {