1//===----------------------------------------------------------------------===//
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// test ratio typedef's
10
11#include <ratio>
12
13#include "test_macros.h"
14
15int main(int, char**)
16{
17 static_assert(std::atto::num == 1 && std::atto::den == 1000000000000000000ULL, "");
18 static_assert(std::femto::num == 1 && std::femto::den == 1000000000000000ULL, "");
19 static_assert(std::pico::num == 1 && std::pico::den == 1000000000000ULL, "");
20 static_assert(std::nano::num == 1 && std::nano::den == 1000000000ULL, "");
21 static_assert(std::micro::num == 1 && std::micro::den == 1000000ULL, "");
22 static_assert(std::milli::num == 1 && std::milli::den == 1000ULL, "");
23 static_assert(std::centi::num == 1 && std::centi::den == 100ULL, "");
24 static_assert(std::deci::num == 1 && std::deci::den == 10ULL, "");
25 static_assert(std::deca::num == 10ULL && std::deca::den == 1, "");
26 static_assert(std::hecto::num == 100ULL && std::hecto::den == 1, "");
27 static_assert(std::kilo::num == 1000ULL && std::kilo::den == 1, "");
28 static_assert(std::mega::num == 1000000ULL && std::mega::den == 1, "");
29 static_assert(std::giga::num == 1000000000ULL && std::giga::den == 1, "");
30 static_assert(std::tera::num == 1000000000000ULL && std::tera::den == 1, "");
31 static_assert(std::peta::num == 1000000000000000ULL && std::peta::den == 1, "");
32 static_assert(std::exa::num == 1000000000000000000ULL && std::exa::den == 1, "");
33
34 return 0;
35}
36

source code of libcxx/test/std/utilities/ratio/typedefs.pass.cpp