#include "components/assist_ranker/binary_classifier_predictor.h"
#include <memory>
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/field_trial_params.h"
#include "base/test/scoped_feature_list.h"
#include "components/assist_ranker/fake_ranker_model_loader.h"
#include "components/assist_ranker/proto/ranker_model.pb.h"
#include "components/assist_ranker/ranker_model.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace assist_ranker {
FakeRankerModelLoader;
class BinaryClassifierPredictorTest : public ::testing::Test { … };
void BinaryClassifierPredictorTest::SetUp() { … }
std::unique_ptr<BinaryClassifierPredictor>
BinaryClassifierPredictorTest::InitPredictor(
std::unique_ptr<RankerModel> ranker_model,
const PredictorConfig& config) { … }
BASE_FEATURE(…);
const base::FeatureParam<std::string> kTestRankerUrl{ … };
PredictorConfig BinaryClassifierPredictorTest::GetConfig() { … }
PredictorConfig BinaryClassifierPredictorTest::GetConfig(
float predictor_threshold_replacement) { … }
GenericLogisticRegressionModel
BinaryClassifierPredictorTest::GetSimpleLogisticRegressionModel() { … }
TEST_F(BinaryClassifierPredictorTest, EmptyRankerModel) { … }
TEST_F(BinaryClassifierPredictorTest, NoInferenceModuleForModel) { … }
TEST_F(BinaryClassifierPredictorTest, GenericLogisticRegressionModel) { … }
TEST_F(BinaryClassifierPredictorTest,
GenericLogisticRegressionPreprocessedModel) { … }
TEST_F(BinaryClassifierPredictorTest,
GenericLogisticRegressionPreprocessedModelReplacedThreshold) { … }
}