diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2b9b79e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto eol=lf + diff --git a/LibSnugLog/include/disruptor.h b/LibSnugLog/include/disruptor.h index 7fcc9ad..cdf8bb7 100644 --- a/LibSnugLog/include/disruptor.h +++ b/LibSnugLog/include/disruptor.h @@ -191,15 +191,3 @@ public: return max_offset; } }; - -struct OverflowWait { - static constexpr overflow_response_t on_overflow = overflow_response_t::must_wait; - void wait() { -#if defined(__clang__) || defined(__GNUC__) - __asm__("nop\n\t"); -#elif _MSC_VER - __nop; -#endif - - } -}; diff --git a/Tests/disruptor.cpp b/Tests/disruptor.cpp index 3a1db17..b390760 100644 --- a/Tests/disruptor.cpp +++ b/Tests/disruptor.cpp @@ -136,11 +136,19 @@ TEST_CASE("Disruptor works sequentially") { } TEST_CASE("Fails if buffer too small") { - REQUIRE_THROWS_AS(disruptor(nullptr, page_size), disruptor_exception); + REQUIRE_THROWS_AS(disruptor(nullptr, page_size), disruptor_exception); } TEST_CASE("Fails if buffer size is 0") { - REQUIRE_THROWS_AS(disruptor(nullptr, 0), disruptor_exception); + REQUIRE_THROWS_AS(disruptor(nullptr, 0), disruptor_exception); +} + +TEST_CASE("Fails if buffer too small") { + REQUIRE_THROWS_AS(disruptor(nullptr, page_size), disruptor_exception); +} + +TEST_CASE("Fails if buffer size is 0") { + REQUIRE_THROWS_AS(disruptor(nullptr, 0), disruptor_exception); } TEST_CASE("Disruptor works on overflow mode if things are not too contentious", "[long][unstable]") {