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 {
54
54
55
55
if (max >= 11 && FXRep::FRACTION_LEN >= kMinFbits ) {
56
56
// (10.71875)_10 = (1010.1011100)_2
57
- constexpr long long kExpected = 1372 ;
57
+ constexpr int64_t kExpected = 1372 ;
58
58
EXPECT_EQ (
59
59
static_cast <XType>(kExpected << (FXRep::FRACTION_LEN - kMinFbits )),
60
60
func (special_num_t ));
@@ -63,9 +63,11 @@ class BitsFxTest : public LIBC_NAMESPACE::testing::Test {
63
63
if constexpr (FXRep::SIGN_LEN > 0 ) {
64
64
if (min <= -11 && FXRep::FRACTION_LEN >= kMinFbits ) {
65
65
// (-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 ),
69
71
func (negative_special_num_t ));
70
72
}
71
73
}
You can’t perform that action at this time.
0 commit comments