chromium/v8/test/unittests/numbers/conversions-unittest.cc

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

// Some random offsets, mostly at 'suspicious' bit boundaries.

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) {}

}  // namespace interpreter
}  // namespace internal
}  // namespace v8