#include "quiche/common/structured_headers.h"
#include <math.h>
#include <limits>
#include <optional>
#include <string>
#include <utility>
#include "quiche/common/platform/api/quiche_test.h"
namespace quiche {
namespace structured_headers {
namespace {
Item Token(std::string value) { … }
Item Integer(int64_t value) { … }
std::pair<std::string, Item> NullParam(std::string key) { … }
std::pair<std::string, Item> BooleanParam(std::string key, bool value) { … }
std::pair<std::string, Item> DoubleParam(std::string key, double value) { … }
std::pair<std::string, Item> Param(std::string key, int64_t value) { … }
std::pair<std::string, Item> Param(std::string key, std::string value) { … }
std::pair<std::string, Item> ByteSequenceParam(std::string key,
std::string value) { … }
std::pair<std::string, Item> TokenParam(std::string key, std::string value) { … }
const struct ItemTestCase { … } item_test_cases[] = …;
const ItemTestCase sh09_item_test_cases[] = …;
const struct ParameterizedItemTestCase { … } parameterized_item_test_cases[] = …;
const struct ListTestCase { … } list_test_cases[] = …;
const struct DictionaryTestCase { … } dictionary_test_cases[] = …;
}
TEST(StructuredHeaderTest, ParseBareItem) { … }
TEST(StructuredHeaderTest, ParseItem) { … }
TEST(StructuredHeaderTest, ParseSH09Item) { … }
TEST(StructuredHeaderTest, SH09HighPrecisionFloats) { … }
TEST(StructuredHeaderTest, ParseListOfLists) { … }
TEST(StructuredHeaderTest, ParseParameterisedList) { … }
TEST(StructuredHeaderTest, ParseList) { … }
TEST(StructuredHeaderTest, ParseDictionary) { … }
TEST(StructuredHeaderTest, SerializeItem) { … }
TEST(StructuredHeaderTest, SerializeParameterizedItem) { … }
TEST(StructuredHeaderTest, UnserializableItems) { … }
TEST(StructuredHeaderTest, UnserializableTokens) { … }
TEST(StructuredHeaderTest, UnserializableKeys) { … }
TEST(StructuredHeaderTest, UnserializableStrings) { … }
TEST(StructuredHeaderTest, UnserializableIntegers) { … }
TEST(StructuredHeaderTest, UnserializableDecimals) { … }
TEST(StructuredHeaderTest, SerializeUnparseableDecimals) { … }
TEST(StructuredHeaderTest, SerializeList) { … }
TEST(StructuredHeaderTest, UnserializableLists) { … }
TEST(StructuredHeaderTest, SerializeDictionary) { … }
TEST(StructuredHeaderTest, DictionaryConstructors) { … }
TEST(StructuredHeaderTest, DictionaryClear) { … }
TEST(StructuredHeaderTest, DictionaryAccessors) { … }
TEST(StructuredHeaderTest, UnserializableDictionary) { … }
}
}