chromium/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.cc

// Copyright 2018 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/subresource_filter/tools/ruleset_converter/ruleset_test_util.h"

#include <fstream>
#include <ios>
#include <istream>

#include "base/files/file_util.h"
#include "components/subresource_filter/tools/rule_parser/rule_parser.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace subresource_filter {

TestRulesetContents::TestRulesetContents() = default;
TestRulesetContents::~TestRulesetContents() = default;

TestRulesetContents::TestRulesetContents(const TestRulesetContents& other)
    :{}

void TestRulesetContents::AppendRules(
    const std::vector<std::string>& text_rules,
    bool allow_errors) {}

void TestRulesetContents::AppendParsedRules(const TestRulesetContents& other) {}

bool TestRulesetContents::operator==(const TestRulesetContents& other) const {}

std::ostream& operator<<(std::ostream& out,
                         const TestRulesetContents& contents) {}

ScopedTempRulesetFile::ScopedTempRulesetFile(RulesetFormat format)
    :{}

ScopedTempRulesetFile::~ScopedTempRulesetFile() = default;

std::unique_ptr<RuleOutputStream> ScopedTempRulesetFile::OpenForOutput() const {}

// Opens the |ruleset_file| with already existing ruleset and returns the
// corresponding input stream, or nullptr if it failed to be created.
std::unique_ptr<RuleInputStream> ScopedTempRulesetFile::OpenForInput() const {}

void ScopedTempRulesetFile::WriteRuleset(
    const TestRulesetContents& contents) const {}

TestRulesetContents ScopedTempRulesetFile::ReadContents() const {}

bool AreUrlRulesEqual(const url_pattern_index::proto::UrlRule& first,
                      const url_pattern_index::proto::UrlRule& second) {}

bool AreCssRulesEqual(const url_pattern_index::proto::CssRule& first,
                      const url_pattern_index::proto::CssRule& second) {}

}  // namespace subresource_filter