chromium/third_party/blink/renderer/platform/geometry/length_test.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 "third_party/blink/renderer/platform/geometry/length.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/geometry/calculation_expression_node.h"
#include "third_party/blink/renderer/platform/geometry/calculation_value.h"

namespace blink {

namespace {

const PixelsAndPercent ten_px(10,
                              0,
                              /*has_explicit_pixels=*/true,
                              /*has_explicit_percent=*/true);
const PixelsAndPercent twenty_px(20,
                                 0,
                                 /*has_explicit_pixels=*/true,
                                 /*has_explicit_percent=*/true);
const PixelsAndPercent thirty_px(30,
                                 0,
                                 /*has_explicit_pixels=*/true,
                                 /*has_explicit_percent=*/true);
const PixelsAndPercent ten_percent(0,
                                   10,
                                   /*has_explicit_pixels=*/true,
                                   /*has_explicit_percent=*/true);
const PixelsAndPercent twenty_percent(0,
                                      20,
                                      /*has_explicit_pixels=*/true,
                                      /*has_explicit_percent=*/true);
const PixelsAndPercent thirty_percent(0,
                                      30,
                                      /*has_explicit_pixels=*/true,
                                      /*has_explicit_percent=*/true);
const PixelsAndPercent twenty_px_ten_percent(20,
                                             10,
                                             /*has_explicit_pixels=*/true,
                                             /*has_explicit_percent=*/true);

}  // namespace

class LengthTest : public ::testing::Test {};

TEST_F(LengthTest, EvaluateSimpleComparison) {}

TEST_F(LengthTest, EvaluateNestedComparisons) {}

TEST_F(LengthTest, EvaluateAdditive) {}

TEST_F(LengthTest, EvaluateMultiplicative) {}

TEST_F(LengthTest, EvaluateClamp) {}

TEST_F(LengthTest, BlendExpressions) {}

TEST_F(LengthTest, ZoomExpression) {}

TEST_F(LengthTest, SubtractExpressionFromOneHundredPercent) {}

TEST_F(LengthTest, SimplifiedExpressionFromComparisonCreation) {}

// Non-simplified and simplified CalculationExpressionOperationNode creation
// with CalculationOperator::kMultiply should return the same evaluation result.
TEST_F(LengthTest, MultiplyPixelsAndPercent) {}

TEST_F(LengthTest, ZoomToOperation) {}

TEST_F(LengthTest, Add) {}

}  // namespace blink