#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <limits>
#include <memory>
#include <vector>
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_base/check.h"
#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h"
#include "partition_alloc/partition_alloc_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(GTEST_HAS_DEATH_TEST) && !PA_BUILDFLAG(IS_ANDROID)
#define ALLOW_DEATH_TEST
#endif
namespace partition_alloc::internal::base::strings {
TEST(SafeSPrintfTestPA, Empty) { … }
TEST(SafeSPrintfTestPA, NoArguments) { … }
TEST(SafeSPrintfTestPA, OneArgument) { … }
TEST(SafeSPrintfTestPA, MissingArg) { … }
TEST(SafeSPrintfTestPA, ASANFriendlyBufferTest) { … }
TEST(SafeSPrintfTestPA, NArgs) { … }
TEST(SafeSPrintfTestPA, DataTypes) { … }
namespace {
void PrintLongString(char* buf, size_t sz) { … }
#if !defined(NDEBUG)
class ScopedSafeSPrintfSSizeMaxSetter { … };
#endif
}
TEST(SafeSPrintfTestPA, Truncation) { … }
TEST(SafeSPrintfTestPA, Padding) { … }
TEST(SafeSPrintfTestPA, EmbeddedNul) { … }
TEST(SafeSPrintfTestPA, EmitNULL) { … }
TEST(SafeSPrintfTestPA, EmitNullptr) { … }
TEST(SafeSPrintfTestPA, PointerSize) { … }
}