#include "components/segmentation_platform/embedder/default_model/default_model_test_base.h"
#include "components/segmentation_platform/internal/metadata/metadata_utils.h"
#include "components/segmentation_platform/internal/post_processor/post_processor.h"
#include "components/segmentation_platform/public/constants.h"
#include "components/segmentation_platform/public/proto/output_config.pb.h"
#include "components/segmentation_platform/public/proto/prediction_result.pb.h"
namespace segmentation_platform {
DefaultModelTestBase::DefaultModelTestBase(
std::unique_ptr<DefaultModelProvider> model_provider)
: … { … }
DefaultModelTestBase::~DefaultModelTestBase() = default;
void DefaultModelTestBase::SetUp() { … }
void DefaultModelTestBase::TearDown() { … }
void DefaultModelTestBase::ExpectInitAndFetchModel() { … }
void DefaultModelTestBase::ExpectExecutionWithInput(
const ModelProvider::Request& inputs,
bool expected_error,
ModelProvider::Response expected_result) { … }
void DefaultModelTestBase::OnFinishedExpectExecutionWithInput(
base::RepeatingClosure closure,
bool expected_error,
ModelProvider::Response expected_result,
const std::optional<ModelProvider::Response>& result) { … }
std::optional<ModelProvider::Response> DefaultModelTestBase::ExecuteWithInput(
const ModelProvider::Request& inputs) { … }
void DefaultModelTestBase::ExpectClassifierResults(
const ModelProvider::Request& input,
const std::vector<std::string>& expected_ordered_labels) { … }
void DefaultModelTestBase::OnFinishedExecuteWithInput(
base::RepeatingClosure closure,
std::optional<ModelProvider::Response>* output,
const std::optional<ModelProvider::Response>& result) { … }
}