chromium/base/strings/stringprintf_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/strings/stringprintf.h"

#include <errno.h>
#include <stddef.h>

#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {

namespace {

// A helper for the StringAppendV test that follows.
//
// Just forwards its args to StringAppendV.
template <class CharT>
static void StringAppendVTestHelper(std::basic_string<CharT>* out,
                                    const CharT* format,
                                    ...) {}

}  // namespace

TEST(StringPrintfTest, StringPrintfEmpty) {}

TEST(StringPrintfTest, StringPrintfMisc) {}

TEST(StringPrintfTest, StringAppendfEmptyString) {}

TEST(StringPrintfTest, StringAppendfString) {}

TEST(StringPrintfTest, StringAppendfInt) {}

// Make sure that lengths exactly around the initial buffer size are handled
// correctly.
TEST(StringPrintfTest, StringPrintfBounds) {}

// Test very large sprintfs that will cause the buffer to grow.
TEST(StringPrintfTest, Grow) {}

TEST(StringPrintfTest, StringAppendV) {}

// Test the boundary condition for the size of the string_util's
// internal buffer.
TEST(StringPrintfTest, GrowBoundary) {}

// Test that StringPrintf and StringAppendV do not change errno.
TEST(StringPrintfTest, StringPrintfErrno) {}

}  // namespace base