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 "hdr/types/clock_t.h" 10 #include "src/time/clock.h" 11 #include "test/UnitTest/Test.h" 12 13 TEST(LlvmLibcClockTest, SmokeTest) { 14 clock_t c1 = LIBC_NAMESPACE::clock(); 15 ASSERT_GT(c1, clock_t(0)); 16 17 clock_t c2 = LIBC_NAMESPACE::clock(); 18 ASSERT_GE(c2, c1); 19 } 20