chromium/third_party/openscreen/src/util/integer_division_unittest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "util/integer_division.h"

#include <chrono>

#include "gtest/gtest.h"

namespace openscreen {
namespace {

constexpr int kDenominators[2] =;

// Common test routine that tests one of the integer division functions using a
// fixed denominator and stepping, one-by-one, over a range of numerators around
// zero.
template <typename Input, typename Output>
void TestRangeAboutZero(int denom,
                        int range_of_numerators,
                        int first_expected_result,
                        Output (*function_to_test)(Input, Input)) {}

TEST(IntegerDivision, DividesAndRoundsUpInts) {}

TEST(IntegerDivision, DividesAndRoundsUpChronoDurations) {}

// Assumption: DivideRoundingUp() is working (tested by the above two tests).
TEST(IntegerDivision, DividesPositivesAndRoundsUp) {}

TEST(IntegerDivision, DividesAndRoundsNearestInts) {}

TEST(IntegerDivision, DividesAndRoundsNearestChronoDurations) {}

// Assumption: DivideRoundingNearest() is working (tested by the above two
// tests).
TEST(IntegerDivision, DividesPositivesAndRoundsNearest) {}

}  // namespace
}  // namespace openscreen