Index: util/win/critical_section_with_debug_info_test.cc |
diff --git a/util/win/time_test.cc b/util/win/critical_section_with_debug_info_test.cc |
similarity index 66% |
copy from util/win/time_test.cc |
copy to util/win/critical_section_with_debug_info_test.cc |
index ad0771e38b7889ab92154490845a0c3aafe13782..dcc596559ccee9862a7127578cc19e20fc04b938 100644 |
--- a/util/win/time_test.cc |
+++ b/util/win/critical_section_with_debug_info_test.cc |
@@ -12,7 +12,7 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#include "util/win/time.h" |
+#include "util/win/critical_section_with_debug_info.h" |
#include "gtest/gtest.h" |
@@ -20,13 +20,13 @@ namespace crashpad { |
namespace test { |
namespace { |
-TEST(Time, Reasonable) { |
- timeval t; |
- GetTimeOfDay(&t); |
- // Assume that time's time_t return is seconds from 1970. |
- time_t approx_now = time(nullptr); |
- EXPECT_GE(approx_now, t.tv_sec); |
- EXPECT_LT(approx_now - 100, t.tv_sec); |
+TEST(CriticalSectionWithDebugInfo, CriticalSectionWithDebugInfo) { |
+ CRITICAL_SECTION critical_section; |
+ ASSERT_TRUE( |
+ InitializeCriticalSectionWithDebugInfoIfPossible(&critical_section)); |
+ EnterCriticalSection(&critical_section); |
+ LeaveCriticalSection(&critical_section); |
+ DeleteCriticalSection(&critical_section); |
} |
} // namespace |