File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class BitsFxTest : public LIBC_NAMESPACE::testing::Test {
5454
5555 if (max >= 11 && FXRep::FRACTION_LEN >= kMinFbits ) {
5656 // (10.71875)_10 = (1010.1011100)_2
57- constexpr long long kExpected = 1372 ;
57+ constexpr int64_t kExpected = 1372 ;
5858 EXPECT_EQ (
5959 static_cast <XType>(kExpected << (FXRep::FRACTION_LEN - kMinFbits )),
6060 func (special_num_t ));
@@ -63,9 +63,11 @@ class BitsFxTest : public LIBC_NAMESPACE::testing::Test {
6363 if constexpr (FXRep::SIGN_LEN > 0 ) {
6464 if (min <= -11 && FXRep::FRACTION_LEN >= kMinFbits ) {
6565 // (-10.71875)_10 = (-1010.1011100)_2
66- constexpr long long kExpected = -1372 ;
67- EXPECT_EQ (static_cast <XType>(kExpected
68- << (FXRep::FRACTION_LEN - kMinFbits )),
66+ constexpr int64_t kExpected =
67+ static_cast <int64_t >(static_cast <uint64_t >(-1372 )
68+ << (FXRep::FRACTION_LEN - kMinFbits ));
69+
70+ EXPECT_EQ (static_cast <XType>(kExpected ),
6971 func (negative_special_num_t ));
7072 }
7173 }
You can’t perform that action at this time.
0 commit comments