chromium/components/segmentation_platform/internal/post_processor/post_processor_unittest.cc

// Copyright 2022 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/segmentation_platform/internal/post_processor/post_processor.h"

#include "components/segmentation_platform/internal/metadata/metadata_utils.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"
#include "components/segmentation_platform/public/result.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace segmentation_platform {

namespace {

// Labels for BinaryClassifier.
const char kNotShowShare[] =;
const char kShowShare[] =;

// TTL for BinaryClassifier labels.
const int kShowShareTTL =;
const int kDefaultTTL =;

// Labels for MultiClassClassifier.
const char kNewTabUser[] =;
const char kShareUser[] =;
const char kShoppingUser[] =;
const char kVoiceUser[] =;

// TTL for MultiClassClassifier labels.
const int kNewTabUserTTL =;
const int kShareUserTTL =;
const int kShoppingUserTTL =;
const int kVoiceUserTTL =;

// Labels for BinnedClassifier.
const char kLowUsed[] =;
const char kMediumUsed[] =;
const char kHighUsed[] =;
const char kUnderflowLabel[] =;

proto::OutputConfig GetTestOutputConfigForBinaryClassifier() {}

proto::OutputConfig GetTestOutputConfigForMultiClassClassifier(
    int top_k_outputs,
    std::optional<float> threshold) {}

proto::OutputConfig GetTestOutputConfigForMultiClassClassifier(
    int top_k_outputs,
    const base::span<float> per_class_thresholds) {}

proto::OutputConfig GetTestOutputConfigForBinnedClassifier() {}

proto::OutputConfig GetTestOutputConfigForGenericClassifier() {}

}  // namespace

TEST(PostProcessorTest, BinaryClassifierScoreGreaterThanThreshold) {}

TEST(PostProcessorTest, BinaryClassifierScoreGreaterEqualToThreshold) {}

TEST(PostProcessorTest, BinaryClassifierScoreGreaterLessThanThreshold) {}

TEST(PostProcessorTest, MultiClassClassifierWithTopKLessThanElements) {}

TEST(PostProcessorTest, MultiClassClassifierWithTopKEqualToElements) {}

TEST(PostProcessorTest, MultiClassClassifierWithThresholdBetweenModelResult) {}

TEST(PostProcessorTest,
     MultiClassClassifierWithThresholdGreaterThanModelResult) {}

TEST(PostProcessorTest,
     MultiClassClassifierWithThresholdLesserThanModelResult) {}

TEST(PostProcessorTest, MultiClassClassifierWithPerClassThresholds) {}

TEST(PostProcessorTest, BinnedClassifierScoreGreaterThanHighUserThreshold) {}

TEST(PostProcessorTest, BinnedClassifierScoreGreaterThanMediumUserThreshold) {}

TEST(PostProcessorTest, BinnedClassifierScoreGreaterThanLowUserThreshold) {}

TEST(PostProcessorTest, BinnedClassifierScoreEqualToLowUserThreshold) {}

TEST(PostProcessorTest, BinnedClassifierScoreLessThanLowUserThreshold) {}

TEST(PostProcessorTest,
     GetPostProcessedClassificationResultWithEmptyPredResult) {}

TEST(PostProcessorTest,
     GetPostProcessedClassificationResultWithNonEmptyPredResult) {}

TEST(PostProcessorTest, GetTTLWhenLabelTTLPresentInMap) {}

TEST(PostProcessorTest, GetTTLWhenLabelTTLNotPresentInMap) {}

TEST(PostProcessorTest, GetTTLForMultiClassWithNoLabels) {}

TEST(PostProcessorTest, GetRawResult) {}

TEST(PostProcessorTest, IsClassificationModel) {}

TEST(PostProcessorTest, BinaryConfigMissingLabel) {}

TEST(PostProcessorTest, MultiClassClassifierMissingLabels) {}

TEST(PostProcessorTest, MultiClassClassifierExtraScore) {}

TEST(PostProcessorTest, BinnedClassifier) {}

}  // namespace segmentation_platform