mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Fix a test that wasn't testing the right thing.
The APFloat "Zero" test was actually calling the APFloat(const fltSemantics &, integerPart) constructor, and EXPECT_EQ was treating 0 and -0 as equal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138745 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41dfabb0e3
commit
9d74909378
@ -34,11 +34,13 @@ static std::string convertToString(double d, unsigned Prec, unsigned Pad) {
|
||||
namespace {
|
||||
|
||||
TEST(APFloatTest, Zero) {
|
||||
EXPECT_EQ(0.0f, APFloat(APFloat::IEEEsingle, 0.0f).convertToFloat());
|
||||
EXPECT_EQ(-0.0f, APFloat(APFloat::IEEEsingle, -0.0f).convertToFloat());
|
||||
EXPECT_EQ(0.0f, APFloat(0.0f).convertToFloat());
|
||||
EXPECT_EQ(-0.0f, APFloat(-0.0f).convertToFloat());
|
||||
EXPECT_TRUE(APFloat(-0.0f).isNegative());
|
||||
|
||||
EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, 0.0).convertToDouble());
|
||||
EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, -0.0).convertToDouble());
|
||||
EXPECT_EQ(0.0, APFloat(0.0).convertToDouble());
|
||||
EXPECT_EQ(-0.0, APFloat(-0.0).convertToDouble());
|
||||
EXPECT_TRUE(APFloat(-0.0).isNegative());
|
||||
}
|
||||
|
||||
TEST(APFloatTest, fromZeroDecimalString) {
|
||||
|
Loading…
Reference in New Issue
Block a user