#include "tools/json_schema_compiler/test/functions_on_types.h"
#include <utility>
#include <vector>
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace functions_on_types = test::api::functions_on_types;
TEST(…) {
{
base::Value::List params_value;
std::optional<functions_on_types::StorageArea::Get::Params> params(
functions_on_types::StorageArea::Get::Params::Create(params_value));
ASSERT_TRUE(…);
EXPECT_FALSE(…);
}
{
base::Value::List params_value;
params_value.Append(9);
std::optional<functions_on_types::StorageArea::Get::Params> params(
functions_on_types::StorageArea::Get::Params::Create(params_value));
EXPECT_FALSE(…);
}
{
base::Value::List params_value;
params_value.Append("test");
std::optional<functions_on_types::StorageArea::Get::Params> params(
functions_on_types::StorageArea::Get::Params::Create(params_value));
ASSERT_TRUE(…);
ASSERT_TRUE(…);
EXPECT_EQ(…);
}
{
base::Value::Dict keys_object_value;
keys_object_value.Set("integer", 5);
keys_object_value.Set("string", "string");
base::Value::List params_value;
params_value.Append(keys_object_value.Clone());
std::optional<functions_on_types::StorageArea::Get::Params> params(
functions_on_types::StorageArea::Get::Params::Create(params_value));
ASSERT_TRUE(…);
ASSERT_TRUE(…);
EXPECT_EQ(…);
}
}
TEST(…) {
functions_on_types::StorageArea::Get::Results::Items items;
items.additional_properties.Set("asdf", 0.1);
items.additional_properties.Set("sdfg", "zxcv");
base::Value results(
functions_on_types::StorageArea::Get::Results::Create(items));
ASSERT_TRUE(…);
ASSERT_EQ(…);
EXPECT_EQ(…);
}
TEST(…) {
base::Value::Dict details_value;
details_value.Set("incognito", true);
base::Value::List params_value;
params_value.Append(std::move(details_value));
std::optional<functions_on_types::ChromeSetting::Get::Params> params(
functions_on_types::ChromeSetting::Get::Params::Create(params_value));
EXPECT_TRUE(…);
EXPECT_TRUE(…);
}