| // Part of the Crubit project, under the Apache License v2.0 with LLVM |
| // Exceptions. See /LICENSE for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //TODO(rosica): We need namespaces in order to be able to test more here. |
| // Tests of items from the `<ctime>` header. |
| tm_zone: "zone".as_ptr() as *const core::ffi::c_char, |
| fn test_limits_inline() { |
| // Tests of items from the `<limits>` header. |
| // https://en.cppreference.com/w/cpp/types/numeric_limits/float_round_style: |
| assert_eq!(0, std::float_round_style::round_toward_zero.into()); |
| assert_eq!(1, std::float_round_style::round_to_nearest.into()); |
| assert_eq!(2, std::float_round_style::round_toward_infinity.into()); |
| assert_eq!(3, std::float_round_style::round_toward_neg_infinity.into()); |
| assert_eq!(-1, std::float_round_style::round_indeterminate.into()); |