#include "components/variations/processed_study.h"
#include <cstdint>
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "components/variations/entropy_provider.h"
#include "components/variations/proto/layer.pb.h"
#include "components/variations/proto/study.pb.h"
#include "components/variations/variations_layers.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace variations {
namespace {
const char kInvalidStudyReasonHistogram[] = …;
const uint32_t kMaxProbabilityValue = …;
Study::Experiment* AddExperiment(const std::string& name,
uint32_t probability,
Study* study) { … }
Study CreateStudy(const std::string& name) { … }
Study CreateValidStudy() { … }
}
TEST(ProcessedStudyTest, InitValidStudy) { … }
TEST(ProcessedStudyTest, InitInvalidStudyName) { … }
TEST(ProcessedStudyTest, InitInvalidExperimentName) { … }
TEST(ProcessedStudyTest, InitInvalidEnableFeatureName) { … }
TEST(ProcessedStudyTest, InitInvalidDisableFeatureName) { … }
TEST(ProcessedStudyTest, InitInvalidForcingFeatureOnName) { … }
TEST(ProcessedStudyTest, InitInvalidForcingFeatureOffName) { … }
TEST(ProcessedStudyTest, InitInvalidForcingFlag) { … }
TEST(ProcessedStudyTest, InitInvalidMinVersion) { … }
TEST(ProcessedStudyTest, InitInvalidMaxVersion) { … }
TEST(ProcessedStudyTest, InitInvalidMinOsVersion) { … }
TEST(ProcessedStudyTest, InitInvalidMaxOsVersion) { … }
TEST(ProcessedStudyTest, InitBlankStudyName) { … }
TEST(ProcessedStudyTest, InitMissingExperimentName) { … }
TEST(ProcessedStudyTest, InitRepeatedExperimentName) { … }
TEST(ProcessedStudyTest, InitTriggerAndNonTriggerExperimentId) { … }
TEST(ProcessedStudyTest, InitExperimentProbabilityOverflow) { … }
TEST(ProcessedStudyTest, InitTotalProbabilityOverflow) { … }
TEST(ProcessedStudyTest, InitMissingDefaultExperimentInList) { … }
TEST(ProcessedStudyTest, ValidateStudy) { … }
TEST(ProcessedStudyTest, ProcessedStudyAllAssignmentsToOneGroup) { … }
}