//===-- TimeoutTest.cpp -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #include "lldb/Utility/Timeout.h" #include "gtest/gtest.h" using namespace lldb_private; using namespace std::chrono; TEST(TimeoutTest, Construction) { ASSERT_FALSE(Timeout(llvm::None)); ASSERT_TRUE(bool(Timeout(seconds(0)))); ASSERT_EQ(seconds(0), *Timeout(seconds(0))); ASSERT_EQ(seconds(3), *Timeout(seconds(3))); ASSERT_TRUE(bool(Timeout(Timeout(seconds(0))))); }