Sleep.tests.cpp 636 B

123456789101112131415161718192021222324
  1. // Copyright Catch2 Authors
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // https://www.boost.org/LICENSE_1_0.txt)
  5. // SPDX-License-Identifier: BSL-1.0
  6. #include <catch2/catch_test_macros.hpp>
  7. #include <chrono>
  8. #include <thread>
  9. TEST_CASE( "sleep_for_100ms", "[.min_duration_test][approvals]" )
  10. {
  11. std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
  12. CHECK( true );
  13. }
  14. TEST_CASE( "sleep_for_1000ms", "[.min_duration_test][approvals]" )
  15. {
  16. std::this_thread::sleep_for( std::chrono::milliseconds( 1'000 ) );
  17. CHECK( true );
  18. }