#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/policy/core/common/schema.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include "base/strings/stringprintf.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
#include "components/policy/core/common/schema.h"
#include "components/policy/core/common/schema_internal.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace policy {
namespace {
#define TestSchemaValidation(a, b, c, d) …
const char kTestSchema[] = …;
bool ParseFails(const std::string& content) { … }
void TestSchemaValidationHelper(const std::string& source,
const Schema& schema,
const base::Value& value,
SchemaOnErrorStrategy strategy,
bool expected_return_value) { … }
void TestSchemaValidationWithPath(const Schema& schema,
const base::Value& value,
PolicyErrorPath expected_failure_path) { … }
std::string SchemaObjectWrapper(const std::string& subschema) { … }
}
TEST(SchemaTest, MinimalSchema) { … }
TEST(SchemaTest, InvalidSchemas) { … }
TEST(SchemaTest, Ownership) { … }
TEST(SchemaTest, ValidSchema) { … }
TEST(SchemaTest, Lookups) { … }
TEST(SchemaTest, Wrap) { … }
TEST(SchemaTest, Validate) { … }
TEST(SchemaTest, InvalidReferences) { … }
TEST(SchemaTest, RecursiveReferences) { … }
TEST(SchemaTest, UnorderedReferences) { … }
TEST(SchemaTest, AdditionalPropertiesReference) { … }
TEST(SchemaTest, ItemsReference) { … }
TEST(SchemaTest, SchemaNodeSensitiveValues) { … }
TEST(SchemaTest, SchemaNodeNoSensitiveValues) { … }
TEST(SchemaTest, EnumerationRestriction) { … }
TEST(SchemaTest, RangedRestriction) { … }
TEST(SchemaTest, ParseToDictAndValidate) { … }
TEST(SchemaTest, ErrorPathToString) { … }
}