File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ class FxBitsTest : public LIBC_NAMESPACE::testing::Test {
2424 static constexpr T eps = FXRep::EPS();
2525 constexpr XType get_one_or_saturated_fraction () {
2626 if (FXRep::INTEGRAL_LEN > 0 ) {
27- return ( XType)(( XType) 0x1 << FXRep::FRACTION_LEN);
27+ return static_cast < XType>( static_cast < XType>( 0x1 ) << FXRep::FRACTION_LEN);
2828 } else {
29- return (
30- XType) LIBC_NAMESPACE::mask_trailing_ones<typename FXRep::StorageType,
31- FXRep::FRACTION_LEN>();
29+ return static_cast <XType> (
30+ LIBC_NAMESPACE::mask_trailing_ones<typename FXRep::StorageType,
31+ FXRep::FRACTION_LEN>() );
3232 }
3333 }
3434
@@ -38,7 +38,8 @@ class FxBitsTest : public LIBC_NAMESPACE::testing::Test {
3838 void test_special_numbers (FxBitsFunc func) {
3939 EXPECT_EQ (zero, func (0 ));
4040 EXPECT_EQ (eps, func (0x1 ));
41- EXPECT_EQ (half, func ((XType)0x1 << (FXRep::FRACTION_LEN - 1 )));
41+ // x.1000...
42+ EXPECT_EQ (half, func (static_cast <XType>(0x1 ) << (FXRep::FRACTION_LEN - 1 )));
4243 // Occupy the bit to the left of the fixed point for Accum types
4344 // Saturate fraction portion for Fract types
4445 EXPECT_EQ (one, func (get_one_or_saturated_fraction ()));
You can’t perform that action at this time.
0 commit comments