chromium/v8/test/unittests/base/division-by-constant-unittest.cc

// Copyright 2014 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.

// Check all examples from table 10-1 of "Hacker's Delight".

#include "src/base/division-by-constant.h"

#include <stdint.h>

#include <ostream>

#include "testing/gtest-support.h"

namespace v8 {
namespace base {

template <class T>
std::ostream& operator<<(std::ostream& os,
                         const MagicNumbersForDivision<T>& mag) {}


// Some abbreviations...

M32;
M64;

static M32 s32(int32_t d) {}


static M64 s64(int64_t d) {}


static M32 u32(uint32_t d) {}
static M64 u64(uint64_t d) {}


TEST(DivisionByConstant, Signed32) {}


TEST(DivisionByConstant, Unsigned32) {}


TEST(DivisionByConstant, Signed64) {}


TEST(DivisionByConstant, Unsigned64) {}

}  // namespace base
}  // namespace v8