#include "src/numbers/conversions.h"
#include <stdlib.h>
#include "src/base/platform/platform.h"
#include "src/base/vector.h"
#include "src/execution/isolate.h"
#include "src/heap/factory-inl.h"
#include "src/init/v8.h"
#include "src/objects/heap-number-inl.h"
#include "src/objects/objects.h"
#include "src/objects/smi.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
namespace interpreter {
class ConversionsTest : public TestWithIsolate { … };
TEST_F(ConversionsTest, Hex) { … }
TEST_F(ConversionsTest, Octal) { … }
TEST_F(ConversionsTest, ImplicitOctal) { … }
TEST_F(ConversionsTest, Binary) { … }
TEST_F(ConversionsTest, MalformedOctal) { … }
TEST_F(ConversionsTest, TrailingJunk) { … }
TEST_F(ConversionsTest, NonStrDecimalLiteral) { … }
TEST_F(ConversionsTest, IntegerStrLiteral) { … }
TEST_F(ConversionsTest, LongNumberStr) { … }
TEST_F(ConversionsTest, MaximumSignificantDigits) { … }
TEST_F(ConversionsTest, MinimumExponent) { … }
TEST_F(ConversionsTest, MaximumExponent) { … }
TEST_F(ConversionsTest, ExponentNumberStr) { … }
using OneBit1 = base::BitField<uint32_t, 0, 1>;
using OneBit2 = base::BitField<uint32_t, 7, 1>;
using EightBit1 = base::BitField<uint32_t, 0, 8>;
using EightBit2 = base::BitField<uint32_t, 13, 8>;
TEST_F(ConversionsTest, BitField) { … }
using UpperBits = base::BitField64<int, 61, 3>;
using MiddleBits = base::BitField64<int, 31, 2>;
TEST_F(ConversionsTest, BitField64) { … }
TEST_F(ConversionsTest, SpecialIndexParsing) { … }
TEST_F(ConversionsTest, NoHandlesForTryNumberToSize) { … }
TEST_F(ConversionsTest, TryNumberToSizeWithMaxSizePlusOne) { … }
TEST_F(ConversionsTest, PositiveNumberToUint32) { … }
struct IntStringPair { … };
static IntStringPair int_pairs[] = …;
TEST_F(ConversionsTest, IntToCString) { … }
struct DoubleStringPair { … };
static DoubleStringPair double_pairs[] = …;
TEST_F(ConversionsTest, DoubleToCString) { … }
struct DoubleInt32Pair { … };
static DoubleInt32Pair double_int32_pairs[] = …;
TEST_F(ConversionsTest, DoubleToInt32) { … }
struct DoubleInt64Pair { … };
static DoubleInt64Pair double_int64_pairs[] = …;
TEST_F(ConversionsTest, DoubleToWebIDLInt64) { … }
}
}
}