Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / libc / test / src / time / clock_test.cpp
blob8d8d89d577a987423d07c4c8b99c995c442b1a64
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 //===----------------------------------------------------------------------===//
9 #include "hdr/types/clock_t.h"
10 #include "src/time/clock.h"
11 #include "test/UnitTest/Test.h"
13 TEST(LlvmLibcClockTest, SmokeTest) {
14 clock_t c1 = LIBC_NAMESPACE::clock();
15 ASSERT_GT(c1, clock_t(0));
17 clock_t c2 = LIBC_NAMESPACE::clock();
18 ASSERT_GE(c2, c1);