#include "util/net/http_body.h"
#include <string.h>
#include "gtest/gtest.h"
#include "test/test_paths.h"
#include "util/misc/implicit_cast.h"
#include "util/net/http_body_test_util.h"
namespace crashpad {
namespace test {
namespace {
void ExpectBufferSet(const uint8_t* actual,
uint8_t expected_byte,
size_t num_expected_bytes) { … }
TEST(StringHTTPBodyStream, EmptyString) { … }
TEST(StringHTTPBodyStream, SmallString) { … }
TEST(StringHTTPBodyStream, MultipleReads) { … }
TEST(FileReaderHTTPBodyStream, ReadASCIIFile) { … }
TEST(FileReaderHTTPBodyStream, ReadBinaryFile) { … }
TEST(CompositeHTTPBodyStream, TwoEmptyStrings) { … }
class CompositeHTTPBodyStreamBufferSize
: public testing::TestWithParam<size_t> { … };
TEST_P(CompositeHTTPBodyStreamBufferSize, ThreeStringParts) { … }
TEST_P(CompositeHTTPBodyStreamBufferSize, StringsAndFile) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}
}