1 //===-- Unittests for clock -----------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "src/time/clock.h" 10 #include "test/UnitTest/Test.h" 11 12 #include <time.h> 13 TEST(LlvmLibcClockTest,SmokeTest)14TEST(LlvmLibcClockTest, SmokeTest) { 15 clock_t c1 = LIBC_NAMESPACE::clock(); 16 ASSERT_GT(c1, clock_t(0)); 17 18 clock_t c2 = LIBC_NAMESPACE::clock(); 19 ASSERT_GE(c2, c1); 20 } 21