[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / libc / test / src / time / clock_test.cpp
blob31f7f1737ec1863389d6b409fa4b3cd4bb5b1c1b
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 "src/time/clock.h"
10 #include "test/UnitTest/Test.h"
12 #include <errno.h>
13 #include <limits.h>
14 #include <time.h>
16 TEST(LlvmLibcClockTest, SmokeTest) {
17 clock_t c1 = __llvm_libc::clock();
18 ASSERT_GT(c1, clock_t(0));
20 clock_t c2 = __llvm_libc::clock();
21 ASSERT_GE(c2, c1);