diff --git a/building-h2o/test.cpp b/building-h2o/test.cpp index b1c44026..23aed822 100644 --- a/building-h2o/test.cpp +++ b/building-h2o/test.cpp @@ -1,24 +1,25 @@ -#include +#include #include #include +#include #include #include #include +#include #include -#include -#include import leetcode_test.building_h2o.H2O; using namespace std; using leetcode_test::building_h2o::H2O; -TEST(building_h2o,main) { +TEST(building_h2o, main) +{ stringstream output; mutex lock; H2O h2o {}; auto t1 = thread([&]() { h2o.hydrogen([&]() { - lock_guard gaurd{lock}; + lock_guard gaurd { lock }; cout << "H" << endl; output << "H"; }); @@ -76,7 +77,8 @@ TEST(building_h2o,main) { ASSERT_EQ(2, count(two.begin(), two.end(), 'H')); } -int main(int argc, char **argv) { +int main(int argc, char** argv) +{ testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } \ No newline at end of file diff --git a/deps.ts b/deps.ts index af283ce6..1d68dfdb 100644 --- a/deps.ts +++ b/deps.ts @@ -3,7 +3,7 @@ import * as path from "https://deno.land/std@0.188.0/path/mod.ts"; import AsyncLimiterClass, { AsyncCurrentLimiter, } from "https://esm.sh/@masx200/async-task-current-limiter@2.1.0/"; -import {join, resolve}from "https://deno.land/std@0.188.0/path/mod.ts"; +import { join, resolve } from "https://deno.land/std@0.188.0/path/mod.ts"; import { BinaryHeap } from "https://deno.land/std@0.188.0/collections/binary_heap.ts"; import { Deque } from "https://esm.sh/@datastructures-js/deque@1.0.4/"; 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) { diff --git a/web-crawler-multithreaded/test.cpp b/web-crawler-multithreaded/test.cpp index df408e94..e132719a 100644 --- a/web-crawler-multithreaded/test.cpp +++ b/web-crawler-multithreaded/test.cpp @@ -11,27 +11,30 @@ import leetcode_test.web_crawler_multithreaded.Solution; using namespace std; using namespace leetcode_test::web_crawler_multithreaded; 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(const T& left, const Y& right) {