#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/i18n/streaming_utf8_validator.h"
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <string_view>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "base/synchronization/lock.h"
#include "base/task/thread_pool.h"
#include "base/test/task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/icu/source/common/unicode/utf8.h"
namespace base {
namespace {
const StreamingUtf8Validator::State VALID_ENDPOINT = …;
const StreamingUtf8Validator::State VALID_MIDPOINT = …;
const StreamingUtf8Validator::State INVALID = …;
const uint32_t kThoroughTestChunkSize = …;
class StreamingUtf8ValidatorThoroughTest : public ::testing::Test { … };
TEST_F(StreamingUtf8ValidatorThoroughTest, DISABLED_TestEverything) { … }
const char* const valid[] = …;
const char* const* const valid_end = …;
const char* const invalid[] = …;
const char* const* const invalid_end = …;
class PartialIterator { … };
class StreamingUtf8ValidatorSingleSequenceTest : public ::testing::Test { … };
class StreamingUtf8ValidatorDoubleSequenceTest : public ::testing::Test { … };
TEST(StreamingUtf8ValidatorTest, NothingIsValid) { … }
TEST(StreamingUtf8ValidatorTest, NulIsValid) { … }
TEST(StreamingUtf8ValidatorTest, HelloWorld) { … }
TEST(StreamingUtf8ValidatorTest, ResetWorks) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Valid) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Partial) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, Invalid) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, ValidByByte) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, PartialByByte) { … }
TEST_F(StreamingUtf8ValidatorSingleSequenceTest, InvalidByByte) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusValidIsValid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusPartialIsPartial) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusValidIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusPartialIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, ValidPlusInvalidIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusValidIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusInvalidIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, InvalidPlusPartialIsInvalid) { … }
TEST_F(StreamingUtf8ValidatorDoubleSequenceTest, PartialPlusInvalidIsInvalid) { … }
TEST(StreamingUtf8ValidatorValidateTest, EmptyIsValid) { … }
TEST(StreamingUtf8ValidatorValidateTest, SimpleValidCase) { … }
TEST(StreamingUtf8ValidatorValidateTest, SimpleInvalidCase) { … }
TEST(StreamingUtf8ValidatorValidateTest, TruncatedIsInvalid) { … }
}
}