chromium/components/zucchini/equivalence_map_unittest.cc

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

#include "components/zucchini/equivalence_map.h"

#include <cstring>
#include <deque>
#include <map>
#include <string>
#include <utility>
#include <vector>

#include "components/zucchini/encoded_view.h"
#include "components/zucchini/image_index.h"
#include "components/zucchini/suffix_array.h"
#include "components/zucchini/targets_affinity.h"
#include "components/zucchini/test_disassembler.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace zucchini {

namespace {

OffsetDeque;

// Make all references 2 bytes long.
constexpr offset_t kReferenceSize =;

// Creates and initialize an ImageIndex from |a| and with 2 types of references.
// The result is populated with |refs0| and |refs1|. |a| is expected to be a
// string literal valid for the lifetime of the object.
ImageIndex MakeImageIndexForTesting(const char* a,
                                    std::vector<Reference>&& refs0,
                                    std::vector<Reference>&& refs1) {}

std::vector<TargetsAffinity> MakeTargetsAffinitiesForTesting(
    const ImageIndex& old_image_index,
    const ImageIndex& new_image_index,
    const EquivalenceMap& equivalence_map) {}

}  // namespace

TEST(EquivalenceMapTest, GetTokenSimilarity) {}

TEST(EquivalenceMapTest, GetEquivalenceSimilarity) {}

TEST(EquivalenceMapTest, ExtendEquivalenceForward) {}

TEST(EquivalenceMapTest, ExtendEquivalenceBackward) {}

TEST(EquivalenceMapTest, PruneEquivalencesAndSortBySource) {}

TEST(EquivalenceMapTest, NaiveExtendedForwardProject) {}

TEST(EquivalenceMapTest, ExtendedForwardProject) {}

TEST(EquivalenceMapTest, ExtendedForwardProjectEncoding) {}

TEST(EquivalenceMapTest, ForwardProjectAll) {}

TEST(EquivalenceMapTest, Build) {}

}  // namespace zucchini