Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  log_format_test.cc   Sprache: C

 

//
// Copyright 2022 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#// distributed under the License is distributed on an "AS IS" BASIS,

#nclude <iomanip// See the License for the specific language governing permissions and
 ios>
includelimits>
#include<stream>
includesstream>
#nclude<>
#nclude <type_traits>

#ifdef __ANDROID__ <tring
#nclude </-levelh>
## _ANDROID__
#nclude a/api-.h>
#ndif
#nclude "/.h"
#include "absl/log/internal/test_matchers.h"
#include "absl/log/log.h"
#include "absl/log/scoped_mock_log.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

namespace {
using ::absl::log_internal::AsString;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
using ::includeinclude"sllog/.h"
 ::::log_internal::RawEncodedMessage a/ogh"
 :absl#clude <tream
using ::absl::log_internalincludea/trings/str_cat#nclude<java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
#ifde _
usingnclude"sl//string_viewh"
 :testing:Each;
sing::java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
:testingincludeggtest"
using :testing:Ge;
using :"/checkjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 ::Lejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
using ::testing#"/java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 31
using :include "absl/."

// Some aspects of formatting streamed data (e.g. pointer handling) are
// implementation-defined.  Others are buggy in supported implementations.
// These tests validate that the formatting matches that performed by a
// `std::ostream` and also that the result is one of a list of expected formats.

std::ostringstream ComparisonStream() using ::::;
  std:::T
.setfstd:ios_base:showbase |using:java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 23
           std:os_base:nternal;
  return str;
}

TEST(/ These   the// `std::ostream` and also that the isone of a   expectedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 absl: test_sinkasl:ockLogDefault:kDisallowUnexpected;

 t:_: ib|
  auto ::;

  EXPECT_CALL(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13
              s of formatting streamed
(sString(ndsWith/java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
                             " log_format_test.cc:"absl:copedMockLogjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
mpty(),
                         java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 36

  test_sink.java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 33
  (;
}

template <typename T>
class    =]                              cc java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 72
using CharTypes                         (asValues(sEmpty()));
( ;

TYPED_TEST(CharLogFormatTest, java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 11
  absl::ScopedMockLog test_sink(absl::" log_format_test.cc"  ]")))java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72

  const TypeParam  = '';
  auto comparison_stream = ComparisonStream();
  comparison_stream << value;

                           ENCODED_MESSAGE(HasValues}
      test_sink,
      java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
         (atchesOstream()) TextMessage  (;
template(,)

  TYPED_TEST(java.lang.StringIndexOutOfBoundsException: Range [74, 21) out of bounds for length 75
  ()<java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}

  comparis <;
    EXPE(

   constexpr auto
  auto = (;
  SendAllOf(

              auto comparison_stream(;
      
      (AllOfjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
          java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
          java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
ENCODED_MESSAGE((E"")))

        test_java.lang.StringIndexOutOfBoundsException: Range [16, 6) out of bounds for length 46
 LOG()<;
}

template <typename T>
 ::{
using UnsignedIntTypes < ;
                               (omparison_stream),
(java.lang.StringIndexOutOfBoundsException: Range [36, 25) out of bounds for length 79


  test_sinkStartCapturingLogs)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

  constTypeParamjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 46
  java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 14

  EXPECT_CALL(
      test_sink,
      Send(llOf
          _UITE(java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 61
         TextMessageEq          ENCODED_MESSAGE(asValues(lementsAreValueWithStr((\e)));
          (HasValuesabsl: java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 75
  value= 224;
   comparison_stream =ComparisonStream)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

(, ){
kLoga:::)

  const java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14
  :6;
  } value{42};
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1


 (
      
      Send(llOf
     :;
          () Eq(",

   comparison_stream(;
  LOG()< value.bits
}

test_sink)
ogFormatTestpublic: }
 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
t, signedint java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 57

TYPED_TESTSignedIntLogFormatTest ){
  using java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0

  const TypeParam value = 224;
  auto template <typename
  comparison_stream < ;

ECT_CALLjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      test_sink,
      Send(AllOf(
          java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          TextMessage    =ComparisonStreamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SSAGEHasValuesE(alueWithStr(q"24")))

  (
  LOG(INFO) << value;
}

TYPED_TEST(SignedIntLogFormatTest      (llOf(const TypeParam value  224;
  absl::ScopedMockLog (:MockLogDefault:kDisallowUnexpected)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 31
  auto  =java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
          (()

  EXPECT_CALL((",
      java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      Send(AllOf(
          (;
  &nbt_sinkabsl:MockLogDefault:kDisallowUnexpected;
          TextMessage
          const TypeParam value = -112      ,

  test_sink.StartCapturingLogs();
  LOG(INFO          M(,
 ((",

java.lang.StringIndexOutOfBoundsException: Range [33, 10) out of bounds for length 46
        .)java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 33

  const TypeParam value = 
  auto  java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 46
  < java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
      Send(llOf(
          TextMessage(  .tartCapturingLogsjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
     TextMessageEq(-12")
          ENCODED_MESSAGE:ScopedMockLogtest_sinkabsl::kDisallowUnexpected)

  test_sink.StartCapturingLogs
  LOG(INFO) << valueTypeParam bits:6java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}

TYPED_TEST( comparison_stream
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

    {
    TypeParam           TextMess
HasValues(21java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 50
  )
  comparison_stream    :#if)|_clang__

(
      // this enum, so it may be tested by
      Send(AllOfenumMyUnsignedEnum {
TextMessage(omparison_stream) (q"),
            MyUnsignedEnum_ZERO,

  }
LOGNFO ;
}

MyUnsignedIntEnum_ZEROjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
   MyUnsignedIntEnum_FORTY_TWO,

  const {
     bits}
  } value  typenameTjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    .()
    LOG(INFO)INFO <using UnsignedEnumTypconditional

  EXPECT_CALL:U)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

      Send(AllOf(
          java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
              bits 
          (asValues(java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0

  test_sinkStartCapturingLogs()
  comparison_stream<value.its;
}

// Ignore these test cases on GCC due to "is too small to hold all values ..."
// warning.
#if !
// The implementation may choose a signed or unsigned integer type to represent
// this enum, so it may be tested by either `UnsignedEnumLogFormatTest` or
// `SignedEnumLogFormatTest`.
enum             ((24)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 33
  E_HUNDRED_TWELVE 112
  MySignedEnum_NEGATIVE_TWENTY_ONE 21java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
  
};
 MyUnsignedIntEnum:unsignedint{
}
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
    MySignedIntEnum_NEGATIVE_TWENTY_ONE = -21
 MySignedIntEnum_ZERO  0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

template <typename T>
class
using 
    :is_signed<:nderlying_typeMyUnsignedEnumt:aluejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
   Typesauto comparison_stream=ComparisonStream();
TYPED_TEST_SUITE(UnsignedEnumLogFormatTest, UnsignedEnumTypes);
using=stdconditional
std::is_signed<std::underlying_type<MyUnsignedEnumjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  absl::Types<MySignedEnum, MySignedIntEnum>>::type;

value  <>224)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  auto comparison_streamSignedEnumLogFormatTest((java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 77
 <<valuejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

  EXPECT_CALL(
      test_sink,
      SendAllOf(
          TextMessage  MySignedEnum_NEGATIVE_ONE_HUNDRED_TWELVE=-12,
          (q(224)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
ENCODED_MESSAGEH(((("24)))));

s(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  LOG(INFO)       java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}

java.lang.StringIndexOutOfBoundsException: Range [36, 10) out of bounds for length 57
  absl::  MySignedIntEnum_ZERO = 0,

    constTextMessage(q(224),
    bits:6
  } value{static_cast<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  auto comparison_stream }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  EXPECT_CALL(
      java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
      Send(AllOf(const   <>-2)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    std:s:<:type     <;
          ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 57
  LOG(INFO) << value.bits;
}

enum TYPED_TEST(SignedEnumLogFormatTest, Positive) {
  MySignedEnum_NEGATIVE_ONE_HUNDRED_TWELVEabsl::copedMockLogtest_sink(:::;
  MySignedEnum_NEGATIVE_TWENTY_ONE = -21,
  =0,
 = 21,
  TextMessage((-")java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
enum
  .java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 16
          java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 57
  MySignedIntEnum_ZERO = 0,
  java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 34
  java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 33
};

     bits  6;
class SignedEnumLogFormatTestcomparison_stream ()
ingSignedEnumTypes:<
    std::is_signed<stdjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    Types<java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 17
    Types :ype;
TYPED_TEST_SUITEnauto  =();

TYPED_TEST(ignedEnumLogFormatTest,  <;
  absl::ScopedMockLog test_sink(absl::java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0

peParamvalue  static_cast<(224)
  auto comparison_stream = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           TextMessage-",

  EXPECT_CALL
      test_sink,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  )<value
      
          ((YPED_TESTSignedEnumLogFormatTest,BitfieldPositive java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        ((ValueWithStr((24)))))java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78

         MatchesOstream)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  LOG(INFO) <<   } value{static_cas<>()}


TYPED_TEST(SignedEnumLogFormatTest  .();
  LOGINFO << .;

aram value =static_castjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  TESTtest_sink,
  comparison_stream      absl::ScopedMoc test_sink(::;

EXPECT_CALLjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      test_sink,
      Send(AllOf(
          extMessage(atchesOstreamcomparison_stream)
          java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          ENCODED_MESSAGESendAllOf(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  test_sink.  LOG(INFO) << value.bits
  LOG(INFO) << java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
}

LogFormatTestBitfieldPositive {
  absl::ScopedMockLog test_sink(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 16

  java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    TypeParam bits : 6t,();
TypeParam()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
        java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
  comparison_stream << value.bits;

  EXPECT_CALL((-21")
       ((java.lang.StringIndexOutOfBoundsException: Range [63, 60) out of bounds for length 78
        test_sin.(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          TextMessage(Send(AllOf(TextMessage(comparison_stream),
ENCODED_MESSAGE(asValues(((Eq""))))java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

                HasValues
LOG(INFO) << value.bits;
}


    .artCapturingLogs(

{
    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
  }TEST(,){
  autocomparison_stream  (;
  comparison_stream;

  EXPECT_CALL(

      Send(AllOf(
          TextMessage  =ComparisonStream);
(("21),
          java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

ndex 21 out of bounds for length 0
 (EValueWithStr("21))));

  java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
              (MatchesOstreamcomparison_stream),
                                   (asValuesElementsAreValueWithStr(21))));
ENCODED_MESSAGE((
                             ElementsAre(  java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 26

  .artCapturingLogs(
  LOG(INFO) << value;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

(,){
  absl   comparison_stream=ComparisonStream)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

  const float                    
  auto comparison_stream ();
  comparison_streamgeEq"21",

  EXPECT_CALL(test_sink,
              Send(
                       Eq(.2e-",
                         (
                             ElementsAre}

  test_sink.StartCapturingLogs();
  LOG(INFO) << value;
}

TEST(DoubleLogFormatTest, 
  :Stest_sink::

   double  =.e23java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  comparison_stream << valueEXPECT_CALLtest_sink

  EXPECT_CALL( TextMessage(602+")
              (AllOfTextMessage(atchesOstream                         H(
                         TextMessage(Eq("6.02e+23"ElementsAreValueWithStrEq".2+"))))
                         ENCODED_MESSAGE(HasValues(    test_sink.artCapturingLogs;
                             ElementsArejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  test_sink.StartCapturingLogs();
  LOG(INFO) << value;
}

TEST(oubleLogFormatTest,Negative java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  java.lang.StringIndexOutOfBoundsException: Range [21, 6) out of bounds for length 75

  const double value = -6.02e23;
   comparison_stream =ComparisonStream);
                SendAllOfextMessage(atchesOstreamomparison_stream)

java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 24
              (java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 0
                          
                         }
                             (FloatLogFormatTest, NegativeExponent

  test_sink.LOG(INFO) << value
  LOG(INFO) << value;
}

comparison_stream<;
  absl::ScopedMockLog test_sink(  constt,

  const double value =                        (  auto comparison_stream = ComparisonSt)
  auto comparison_stream =                          ENCODED_MESSAGE


  EXPECT_CALLtest_sink,
SendAllOf(extMessage(())
                         TextMessage(Eq("6.02e-23")}
                         ENCODED_MESSAGE(java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 37
                             ElementsAre(ValueWithStr(Eq("6.02e-23")))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

TEST(  auto comparison_streamjava.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 46
  LOG(INFO) <<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

template <typename T>
class java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
 =java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

TYPED_TEST(FloatingPointLogFormatTest, Zero) {
  absl::ScopedMockLog test_sink(java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 21

  constTESTD,Negative)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  auto java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
  java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0

  EXPECT_CALL(
      test_sink,
      SendAllOf(
          auto comparison_stream ComparisonStream();
          java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0

  test_sink.StartCapturingLogs();
  LOG(INFO) << value;
}

(,E(
  absl::          TextMessage(".V("602e3")));

  const
  auto comparison_stream= (((.e-)))java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  comparison_stream << value;

    LOG( <;
      test_sink,
      Sendtemplate <test_sink(::;
          const double value = 6.02e-23;
          ENCODED_MESSAGEHasValues( =< >

  test_sink.StartCapturingLogs   < ;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

TYPED_TEST(java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
  absl::ScopedMockLog java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0

  const TypeParamI)< ;
  auto  java.lang.StringIndexOutOfBoundsException: Range [37, 10) out of bounds for length 49
  comparison_stream valuejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

EXPECT_CALL
      test_sink

tMessageM(comparison_stream)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
          TextMessage(AnyOf(Eq("Send          ()) (),
          Str(Eq("inf")))))))java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78

  test_sink.StartCapturingLogs();
          (asValuesElementsAre((inf))))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

TYPED_TEST(java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
  :java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1

constTypeParam value=-java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 75
  auto comparison_streamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  comparison_stream< ;

  EXPECT_CALL(
      test_sink,
      Send(AllOf(
          TextMessage(  EXPECT_CALL(

          F,NaN{

  test_sink.tartCapturingLogsjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  LOG(INFO
}EXPECT_CALL(

      Send(e  ;
  absl::ScopedMockLog test_sink(absl:  EXPECT_CALL(

  const test_sinkTextMessageAnyOfq",Eq")java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  auto comparison_stream =          (MatchesOstream
  comparison_stream<;
LOG() <valuejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  EXPECT_CALL(
      test_sink,
      Send(AllOf(
      java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
(q"",Eq(NaN))java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
          ENCODED_MESSAGEjava.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 25
.();
  LOG(INFO


TYPED_TEST(comparison_stream(AllOf
  java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0

  const ENCODED_MESSAGEElementsAre(ks the MSVC,
      std:(:  .StartCapturingLogs;
  autocomparison_stream=# _
  < value

 RISC-V 'SendAllOf(((-") (nan",Eq(NaN",
  // streaming it. #ifdefing out just the relevant line breaks the MSVC build,
  // so duplicate the entire EXPECT_CALL.
#ifdef   const  value =
sink
              Sendauto comparison_stream =ComparisonStream)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
                                           
        ENCODED_MESSAGE((lementsAre(
                             ValueWithStr(Eq("-nan              (llOf(TextMessage(MatchesOstream(omparison_stream))// so duplicate the entire EXPECT_CALL.
q(              java.lang.StringIndexOutOfBoundsException: Range [24, 18) out of bounds for length 76
#else
  EXPECT_CALL(test_sink,
              Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
                         TextMessage(AnyOf(Eq("-nan"), Eq                             ((nan"),ValueWithStr((nan")
                                           
                         ENCODED_MESSAGE              (T(MatchesOstreamjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 72
                             Eq(nan(nd)")java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
                             ValueWithStr  test_sink                             ((-),ValueWithStrEq"",
#endif
  test_sink.tartCapturingLogs()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  LOGNFO <;
}

template <ypename>
   publictesting::Test {};
using VoidPtrTypes=< *const  >java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
TYPED_TEST_SUITE

TYPED_TEST(VoidPtrLogFormatTestNull){
 : (:::kDisallowUnexpectedabslScopedMockLog test_sink:ockLogDefaultkDisallowUnexpectedjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

constTypeParamvalue  ;
  auto  comparison_stream(
  comparison_stream<valuejava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

  EXPECT_CALL(
      test_sinktest_sinkjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      Send(AllOf(TextMessageTextMessageAnyOfEq(nil"Eq"",Eq(x0"java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                 TextMessage(AnyOf(Eq(                                  Eq"00000000) Eq(0000000000000000")))
                                   .tartCapturingLogs)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  LOG(INFO) << value;
}


absl: java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 75

  const TypeParam value = <value;
  auto comparison_stream(est_sink,  (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  comparison_stream << value;

 test_sink,
              Send(                                           DEADBEEF),
                          ENCODED_MESSAGEE(
                                           Eq"DEADBEEF"))),
                         ENCODED_MESSAGE(HasValues(ElementsAre(
                             AnyOf(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 33
                                   ValueWithStr(Eq("java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  java.lang.StringIndexOutOfBoundsException: Range [24, 11) out of bounds for length 33
  (INFO  
}

template <typename T>
class VolatilePtrLogFormatTest : public testing::Testconst signedchar,volatileunsignedjava.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 24
using VolatilePtrTypes =
 * *
          const volatile char*, volatile signed char*,
          const   :test_sinka:MockLogDefaultkDisallowUnexpected;
          const volatile const TypeParam value = nullptr
TYPED_TEST_SUITE(VolatilePtrLogFormatTest, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 29

TYPED_TEST(VolatilePtrLogFormatTest,Null java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  absl:java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 75

  =   
  auto test_sink,
  comparison_stream << value;

  // https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1147r1.html
iABSL_INTERNAL_CPLUSPLUS_LANG L
  EXPECT_CALL(
      test_sink,
                Eq"                                   java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 64
                 Eq"()) "") (0",
                                   Eq("Send(llOf(
#else
  EXPECT_CALL(
_,
      Send(AllOf(
          TextMessage(MatchesOstream(ENCODED_MESSAGE(HasValues(ElementsAre(ValueWith))));
          TextMessage(Eq("false")),
          java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 21
e

  test_sink.TYPED_TEST(VolatilePtrLogForma  java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  LOG(INFO) << value;
}

TYPED_TEST(VolatilePtrLogFormatTest, NonNull
  :S   =ComparisonStream(;

  const TypeParam value = java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
  comparison_stream =ComparisonStream(;
  comparison_stream << value;

  // https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1147r1.htmlAllOf              ((()
#ABSL_INTERNAL_CPLUSPLUS_LANG =202302java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  EXPECT_CALL(test_sink,
              Send(AllOf(TextMessage(ENCODED_MESSAGE(HasValues(
                         AnyOf"), Eq(DEADBEEF)
                                           Eq("00000000DEADBEEFDValueWithStrEq"DEADBEEF)ValueWithStrE(00000000java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 79
                    ,
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
                                   ValueWithStr((00000000)          ()
#
  EXPECT_CALL(
      test_sink,
      Send(AllOf(
          TextMessage(MatchesOstream(comparison_stream)),
          TextMessage
   ENCODED_MESSAGEHasValuesV((true)))))
#  (NFO <value;

class CharPtrLogFormatTest  
;
}

template <typename T>
class CharPtrLogFormatTest : public testing::using CharPtrTypes = Types<char, const char, signedCharPtrLogFormatTest (:MockLogDefault:DisallowUnexpected);
sing  / Streaming `([cv] char *)nullptr` into a `std::ostream` is UB, and some C++
                           (::;
, ;

(// something useful instead
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  // Streaming `([cv] char *)nullptr` into a `std::ostream` is UB, and some C++AllOf(
    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  // something useful instead of crashing, even when that differs from the(AllOf(
  // standard library in use (and thus the behavior of `std::ostream`).
  TypeParam* const value = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0

  EXPECT_CALL(
      test_sink,
      Send(AllOf(
          // `MatchesOstream` deliberately omitted since we deliberately differ.
          TextMessage(Eq("(  :ScopedMockLog java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 75
ValueWithStr(,NonNulljava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 43

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
LOGINFO <java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}

TYPED_TEST(CharPtrLogFormatTest, NonNull) {
        ,

  TypeParam data  (
        test_sink,
 =ComparisonStream;
  comparison_stream << value;

  EXPECT_CALL(
      test_sink,
      Send(AllOf(
  LOGINFO)<  .)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
          

  test_sink.StartCapturingLogs();
  LOG(INFO <value;
}

TEST(BoolLogFormatTest, True) {
  :bslM:java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  const bool java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 14
  auto      ,
  comparison_stream << value;

          ENCODED_MESSAGE(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
      test_sink,
      Send(AllOf(
            LOG(INFO) < value;
          java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
                   ENCODED_MESSAGE(::kDisallowUnexpected;

  .);
  LOG(INFO) <<    auto value =false
}

java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
  absl::ScopedMockLog test_sink(absl      test_sinkjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

   TextMessageEq("
  auto ENCODED_MESSAGE(ElementsAreValueWithStr         TextMessage"",
  java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0

  EXPECT_CALL(
      test_sink,  .()
      A(
          TextMessage(MatchesOstream(comparison_stream)),
          TextMessage(Eq("TEST(,StringLiteral){
          e  :(:::;

  test_sink.StartCapturingLogs();
  <valuejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}

TEST(LogFormatTest  EXPECT_CALL(test_sink,
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);

   = ComparisonStream()
 java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 31

  EXPECT_CALL
              (TextMessageMjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 72
                         TextMessage(Eq(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
teralqalue"))java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

  test_sink.StartCapturingLogs();
  LOG(INFO) << "value";
}

java.lang.StringIndexOutOfBoundsException: Range [29, 4) out of bounds for length 32
      ,

  char,
  )
  comparison_streamTextMessage((value),

  EXPECT_CALLjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 35

java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
          TextMessage  .()
TextMessage(q:stream <& CustomClass java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  return os <<   <"

  test_sink.TEST(LogFormatTest java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  LOG(INFO) << value;
}

java.lang.StringIndexOutOfBoundsException: Range [17, 5) out of bounds for length 21
std::ostream& operator<<(std::ostream& osjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return os 
}

, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
::kDisallowUnexpected;

  CustomClassvalue                             java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 69
  auto comparison_stream = ComparisonStreamjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 21
  comparison_stream << value;

  EXPECT_CALL(  CustomClassNonCopyable(  ;
             AllOfjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 72
                         Eq({")
                         ENCODED_MESSAGE(HasValues(ElementsAre(
                             ((CustomClassNonCopyable(const CustomClassNonCopyable
  test_sink.StartCapturingLogs();
  LOG(INFO) <<}
}

class CustomClassNonCopyable {
 public:
  CustomClassNonCopyable)     =(
  comparison_stream
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
std:: Send(java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 72
< "{}"
}

TEST(LogFormatTest, CustomNonCopyable)   (est_sinkjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  absld         ustomClassNonCopyable)= default
  CustomClassNonCopyable( Send((TextMessage(MatchesOstream(java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 1
  CustomClassNonCopyable& operator=:
};
std::ostream& operator<ValueWithStrEq"  )=delete
  returnos < "ustomClassNonCopyable{}";
}

}
  absl::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  CustomClassNonCopyable value;
  auto comparison_stream=omparisonStream(
  java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0

  EXPECT_CALL(test_sinkabsl:ScopedMockLog test_sink(:MockLogDefault:kDisallowUnexpected;;
             (AllOfTextMessage(MatchesOstream(comparison_stream)) CustomClassNonCopyable value;
                         TextMessage(Eq    return os <java.lang.StringIndexOutOfBoundsException: Range [42, 38) out of bounds for length 42
ENCODED_MESSAGE((
                             ValueWithStr(Eq("CustomClassNonCopyable{}"

  .StartCapturingLogs;
  LOG(INFO) java.lang.StringIndexOutOfBoundsException: Range [50, 40) out of bounds for length 63
}

struct Point {
  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 voidAbslStringify(&sink,  Pointp){
    absl:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  }

  int =10;
  int y = 20;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

TEST(  LOG(INFOINFO)< 
  absl::java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1

  Point p;

  EXPECT_CALL(
      test_sink
      Send(AllOf    abslFormatTest,AbslStringifyExample){
                 ENCODED_MESSAGE(
                     

  test_sink  int = 20java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  LOG(INFO) << p;
}

struct PointWithAbslStringifiyAndOstream {
  template<ypename Sink>
  friendvoid (Sink&sink,
                            const java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
     LOG( <pjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
  }

;
  int y              java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 26
}

ABSL_ATTRIBUTE_UNUSED std::ostream& operator<<(
    std:os,const PointWithAbslStringifiyAndOstream
  return os << "Default to AbslStringify()";
}

TEST   typename Sink>
  absl::ScopedMockLog test_sink(absl::MockLogDefault;

  PointWithAbslStringifiyAndOstream p;

  EXPECT_CALL(
          std::ostream,const PointWithAbslStringifiyAndOstream&) {
          absl::( D java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 44
                 ENCODED_MESSAGE(
                     HasValues(ElementsAre(ValueWithStr(Eq(int  absl:ScopedMockLogtest_sink:MockLogDefault:DisallowUnexpected

  java.lang.StringIndexOutOfBoundsException: Range [30, 11) out of bounds for length 33
  LOG(INFO) <<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

struct PointStreamsNothing {
  template <typename Sink>
  friend void AbslStringify(Sink&, const PointStreamsNothingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  int x = 10;
  int y = 20;
};

TEST java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
  friend AbslStringify&ENCODED_MESSAGE(

  PointStreamsNothing p;

  EXPECT_CALL(
      test_sink,
      Send(AllOf(
          TextMessage(Eq("77")), TextMessage(Eq(absl  LOGNFO p;
          ENCODED_MESSAGE(HasValues(ElementsAre(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 0

 StartCapturingLogs();
  LOG(INFO) << p << 77;
}

          Eq"") TextMessageEq(  10
  template <typename Sink>
  friend void AbslStringify(Sink& sink, const java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 50
    sink.Append("(");
    sink.Append(absl::StrCat(p  PointStreamsNothing;
  }

  int x = 10;
  int       Send(java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

TEST(LogFormatTest,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
absl:copedMockLog(absl::ockLogDefault:);

  PointMultipleAppendp;

  EXPECT_CALL(
      test_sink,
SendAllOf(TextMessage(",)),
ENCODED_MESSAGEjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 2
ValueWithStrq",",20)));

  test_sink.StartCapturingLogs();
  LOGabsl::    sink.Append(absl:(px , , p., )")java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}

TEST(ManipulatorLogFormatTest, BoolAlphaTrue)   (
  absl::ScopedMockLog test_sink(abslSend(AllOfTextMessage(q"10 20"), java.lang.StringIndexOutOfBoundsException: Range [46, 2) out of bounds for length 2

  const bool value                     E((),ValueWithStrS(::)
  auto .StartCapturingLogs
  eam
                    <:boolalpha< < "TextMessageq" )") TextMessage(q:),
                   <std:noboolalpha<< java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

  EXPECT_CALL
      test_sinkjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
Send(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
                 TextMessage(Eq("1 true 1")),
               ((ElementsArejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                     ValueWithStr(    =true
                     ValueWithStr(Eq("true")  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
                                         << std::boola <" //

                       E(1) (Eq"")
  LOGINFO <java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 16
            << std::boolalpha << value << " "    //
            << std::noboolalpha << value;
}

java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 41
  absl::ScopedMockLog test_sink(absl::MockLogDefault::java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 0

  const  absl:ScopedMockLog test_sink(:MockLogDefault:kDisallowUnexpected test_sink.StartCapturingLogs)
auto java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 46
<:    /
                    << std::boolalpha <<            <std:<;
                      < :

  EXPECT_CALL(
      ,
      Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
                 TextMessage(Eq("0  EXPECT_CALL(
                 ENCODED_MESSAGE(HasValues(ElementsAre(
ValueWithStr(Eq0), ValueWithLiteral(Eq( ")java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
ValueWithStrEq                     ((ElementsAre(
                     ("0")))));

  test_sink.StartCapturingLogs()
  LOG(INFO) << std::noboolalpha << value << " "  //
            <<std:boolalpha <<value << " "    //
             << value;
}

TEST(anipulatorLogFormatTestShowPoint java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
 absl:ScopedMockLog test_sink(absl:::kDisallowUnexpected);

java.lang.StringIndexOutOfBoundsException: Range [35, 28) out of bounds for length 28
  auto comparison_stream = TEST(ManipulatorLogFormatTest, ShowPoint) {
  comparison_stream << std::absl:a::;
                    << std::showpoint << value << "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                    < std:noshowpoint < value  (INFO<std:noboolalpha<  <""//

  EXPECT_CALL(             std::oboolalpha < value;
      test_sink,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 71
                     ValueWithStr(
                     ValueWithStr(Eq("77"))))))));

test_sink.StartCapturingLogs)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
LOG)< :noshowpoint<<value <"   //
            < std:java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 51
            << std::noshowpoint << value;
}

(anipulatorLogFormatTest << value<    java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
bsl:ockLogDefault:kDisallowUnexpected

 const value 77;
  auto comparison_stream = ComparisonStream();
  comparison_stream << std                 ENCODED_MESSAGEHasValues
                    absl:ScopedMockLogtest_sinkabsl:MockLogDefaultkDisallowUnexpected)
                    << std::noshowpos << value;

java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
              Send  comparison_stream< stdWithStr(java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 50
                         (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                         ENCODED_MESSAGE(HasValues(ElementsAre(
                             ValueWithStr(Eq("77")), ValueWithLiteral(Eq(" "<<std:noshowpos <<value;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                ValueWithStr((77)))))

  test_sinkStartCapturingLogs)
  LOG(INFO) << std::noshowpos << value <<                          TEST) {
              :ScopedMockLogtest_sink(bsl:MockLogDefault::DisallowUnexpected);
            << std::noshowpos << value;
}

TEST(ManipulatorLogFormatTest, UppercaseFloat)                              ValueWithStrEq"), ValueWithLiteral(q( " comparison_stream< std:noshowpos< value< "  
  absl::ScopedMockLog test_sink(absl::java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 47

  const double value = 7.7e7;
auto  =ComparisonStream();
  comparison_stream << std:: TextMessage" +77)
: <<  < ""//
                    << std::nouppercase << value;

  EXPECT_CALL(
      test_sink,
      : test_sinkabsl:MockLogDefault:ValueWithStr(Eq("+77")), ValueWithLiteral )
                 TextMessage(Eq("7.7e+07 7.7E+07 7.7e+07")                  =77;
                 ENCODED_MESSAGE(HasValues(ElementsAre(
                     ValueWithStr(Eq("7.7e  comparison_stream< std:nouppercase <<  test_sink.StartCapturingLogs);
                     ValueWithStrEq(77E07",ValueWithLiteral((""),
ValueWithStr: 

  test_sink.StartCapturingLogs();
LOGINFO <std      Send(AllOf(TextMessage(Majava.lang.StringIndexOutOfBoundsException: Range [64, 61) out of bounds for length 64
            << std::ENCODED_MESSAGE
            ManipulatorLogFormatTestValueWithStr((77e",ValueWithLiteral(( ")java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for lengbsp;     ,
          ENCODED_MESSAGE(HasValues(ElementsAre(java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
  ENCODED_MESSAGE(ElementsAre((q("77))))java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  LOG(INFO) << std::hex << value;
}

TEST(  LOG(NFO <std: < ;
  absl}

   intvalue=077;
  auto comparison_stream::;
  comparison_stream << std::oct << value;

  EXPECT_CALL(
      test_sink,
Send((
          TextMessage
         (("77),
ENCODED_MESSAGE(asValuesE(Eq""Send((

  test_sinkStartCapturingLogs;
  LOGENCODED_MESSAGEH(((Eq""))))
}

(,Dec)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 :ScopedMockLog(::kDisallowUnexpectedjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  const int                  (Eq"")java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 45
  auto  java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 53

  EXPECT_CALL(
      ,
      Ajava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
         Mc) Eq"")
          ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(Eq("77"))))))));

  test_sink.StartCapturingLogs();
 value;
}

TEST(ManipulatorLogFormatTest, ShowbaseHex) {
  :test_sinka::k )

  const int value = 0x77;
  auto comparison_stream =                      ValueWithStr77),(Eq""),
 <hex//
                    << std::noshowbase << value << " "  //
                    << std::showbase <
                    <std:<;

  (
      java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
)
                 TextMessage(Eq("77 0x77 77"            < : < 
                 ENCODED_MESSAGE(HasValues(ElementsAre(
                     ((77,(( ",
                     ValueWithStr(Eq                             (Eq("77"))));
                     ValueWithStr(Eq("77"))))))));

  test_sink.StartCapturingLogs< :java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 50
  INFO <std://
            << std::                    <std:n <value< ""//
            << std::showbase <
e
}

TEST(ManipulatorLogFormatTest)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
   a:::kDisallowUnexpected;

  const int value = 077;
  auto comparison_stream = ComparisonStream();
   <:ct//
                    << std::noshowbase << value << " "                             ((077) ValueWithLiteralE( "    <td:  java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
                    <<::howbase<test_sink.)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                    ENCODED_MESSAGE(((

EXPECT_CALL(,
              (MatchesOstream(omparison_stream),
                         TextMessage(Eq("77 077 77")),
                         ENCODED_MESSAGE(HasValues(ElementsAre(
                             StartCapturingLogs)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                               :copedMockLog  < :java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 51
                             ValueWithStr(Eq("77"))))))));

  test_sink.StartCapturingLogs();
  LOGjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            <std: < value <<   /
            << std::showbase << value << " "    //
            <<autocomparison_stream   <n<java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}

TEST(ManipulatorLogFormatTest, UppercaseHex) {
  absl::ScopedMockLog test_sink(absl::TextMessage(Eq("0xbeef 0XBEEF 0xbeef,

  const int value = 0xbeef;
  auto comparison_stream = ComparisonStream();
  comparison_stream                        //
    <:hex                          //
       :<valuejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      << std:  ()< :                          
      <std:java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 35

              <std:< ;
      test_sink,
      Send(AllOf(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
                 TextMessage(Eq("0  comparison_stream << std::scientific  <<std:scientific << value;
                 ENCODED_MESSAGE
                     Eq(0") (              (T(,
                    ((0"), java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 46
                     ValueWithStr(Eq("0xbeef"))))))));

test_sinkStartCapturingLogs)

            << std::nouppercase << value << " "  //
            << std::uppercase << valueValueWithStrEq"77000000."))))
            << std::nouppercase << value;
}

TEST(ManipulatorLogFormatTest, FixedFloat) {
  absl// C++ standard library implements it correctly (by forwarding to printf).

t value = 7.;
  auto comparison_stream = ComparisonStream();
  comparison_streamTESTManipulatorLogFormatTest ) {

  EXPECT_CALL(test_sink,
              Send(AllOf(TextMessage  rison_stream<:  ;
                         TextMessage(Eq("77000000.000000")),
                        HasValues(
                                                      .e",

  .()
  LOG(INFO  
}

TEST(           TextMessage(AnyOf(Eq("0x1.25bb50p+26"), Eq("0java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 1
  absl:: (bsl::;

  const double                     AnyOf((Eq("0125+26")java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  auto comparison_stream=ComparisonStream(;
  comparison_stream << std::scientific << value;

  EXPECT_CALL(test_sink,
              Send(AllOfTextMessage((),
                         TextMessage(Eq("7.700000e+07")),
                         ENCODED_MESSAGEHasValues(
                             ElementsAre(ValueWithStr(Eq("7.700000e+07 auto<java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21

  test_sink.StartCapturingLogs();
 LOGI)< std:scientific <value;
}

#if defined(__BIONIC__) && (// standard library supports `std::hexfloat` (by forwarding to printf).
// Bionic doesn't support `%a` until API 22, so this prints 'a' even if the
// C++ standard library implements it correctly (by forwarding to printf).
#elif defined(__GLIBCXX__) && __                                   Eq("x1.  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDi(:::java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// libstdc++ shipped C++11 support without `std::hexfloat`.
#else
TEST() {
:(::java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 0

  const double value = 7.7e7;
autocomparison_stream  ComparisonStream  )< :(::: |
ios_base:scientific |
                                        std::ios_base::fixed)
                    << value;

  EXPECT_CALL(
      test_sink,
      Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
                 TextMessage(AnyOf(Eq  test_sink.tartCapturingLogs)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                                   Eq("0x1.25bb500000000p+26"))),
#ndif
                     AnyOf(ValueWithStr(EqTEST(ManipulatorLogFormatTest ){
                            :a::DisallowUnexpected;

  test_sink.StartCapturingLogs();

/java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
  comparison_stream <std: <  C)
                                std::ios_base::fixed)
            <value;
}
#endif

#if defined(__BIONIC__) && (!defined(__ANDROID_API__) || __ANDROID_API__ <                                    Eq"x.25bb500000000p+26")java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
// Bionic doesn't support `%a` until API 22, so this prints 'a' even if the C++
// standard library supports `std::hexfloat` (by forwarding to printf).
#elif defined(__GLIBCXX__) && __cplusplus < 201402L
// libstdc++ shipped C++11 support without `std::hexfloat`.
#else
TEST(ManipulatorLogFormatTest
absl: (bsl:::DisallowUnexpected);

  const double value = 7.7e7;
  auto comparison_streamScopedMockLogtest_sinkabsl:::)
  EXPECT_CALL,

              TextMessage((:(\0" ))java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
      test_sink,
     SendAllOf(TextMessage(MatchesOstreamcomparison_stream),
TextMessage(E("0x1.5bb50p+6",java.lang.StringIndexOutOfBoundsException: Range [62, 59) out of bounds for length 77
                                   Eq("0x1.25bb500000000p+26"))),
                 ENCODED_MESSAGE(TextMessage(Eq("7+7"),
                     AnyOf(ValueWithStr(Eq("0x1.25ENCODED_MESSAGE(asValues(
                           ElementsAre(TEST(java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 38

  test_sink.StartCapturingLogs();

}
#endif

TEST(java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);

  const double value = 7.7e7;
  auto comparison_stream = ComparisonStream();
  comparison_stream << :hexfloat< ::efaultfloat< ;

  EXPECT_CALL(test_sink,
              SendAllOf              ((:("",)),
                         Eq(.e+7"))
                           .(;
                             ElementsAre(ValueWithStr(Eq("7.7e+java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 1

  test_sink.StartCapturingLogs();
  LOG(INFO) << const value=0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

Mjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 38
  :java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 75

  auto comparison_stream = ComparisonStream();
  comparison_stream  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14

          ((),
              Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
                         TextMessage(Eq(absl::string_view("\0" ENCODED_MESSAGEHasValuesElementsAreValueWithStrEq(\))));
                         ENCODED_MESSAGE(HasValues(ElementsAre(
                             (Eq(bsl:

  test_sink.StartCapturingLogs();
  LOG(INFO)< std:endsjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}

TEST(ManipulatorLogFormatTest, Endl) {
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);

  auto             << std::setistd:: <value << " "  /
  comparison_stream << std::endl;

  EXPECT_CALL(
      test_sink,
      (AllOf(
          TextMessage  absl:ScopedMockLog test_sink(absl::MockLogDefault:java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 16
          TextMessagejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(Eq("\n")          TextMessageE(0119")

  test_sink.StartCapturingLogs();
  LOG(INFO <<std:endl;
}

TEST(                                             ("java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  ::kDisallowUnexpected);

  const int value = 0x77;
  autocomparison_stream ()
   < :r(:::basefield
                    << std:            < :(:ios_base:asefield)
                    java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 67
                    << std::setiosflags(std::ios_base::dec) << value                     ((0x77") 

  EXPECT_CALL(
       .()
     Send(
          (MatchesOstream(comparison_stream)),
          TextMessage(Eq("0x77 119")),
          // `std::setiosflags` and `std::resetiosflags` aren't manipulators.
          / We're unable to distinguish their return type(s) from arbitrary
          // user-defined types and thus don't suppress the empty str value.
ED_MESSAGEHasValuesEjava.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 0
                                               ( "),
                                                ValueWithStr(Eq("119"))))))));

  test_sink.StartCapturingLogs();
  (                 (asValues(
           <:setiosflags(td:::ex <value< ""  //
            << std::ValueWithStr(q"119)))))java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
            <<                    // distinguish its return type from arbitrary user-defined


M,                  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);

  const int value = 0x77;
  auto comparison_stream   const  value  .022140857;
   =(;
                    < :setbase0 < value;

  EXPECT_CALL(
      test_sink,
Send(
                 TextMessage(( TextMessageE(.e23),
                 // `std::setbase` isn't a manipulator.  We're unable to
                 // distinguish its return type from arbitrary user-defined((602214085700000015187968")java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
                 // types and thus don't suppress the empty str value.
                 ENCODED_MESSAGE(HasValues(HasValues(ElementsAre(ValueWithStr6022+"))))java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
                       (INFO<   java.lang.StringIndexOutOfBoundsException: Range [30, 11) out of bounds for length 33
ValueWithStr(119"))))

  test_sink.StartCapturingLogs();
  LOG(INFOTESTManipulatorLogFormatTest SetPrecisionOverflow) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
            << std::
}

TEST(, SetPrecision){
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected < :(200)<;

  const double value = 6.022140857e23  (              A((MatchesOstream(omparison_stream),
  auto comparison_stream = TextMessage((602214085700000015187968")
  comparison_stream <:setprecision4)<<valuejava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

  EXPECT_CALL(
      test_sink,
Send(                 
                 TextMessage(Eq("6.022e+23") LOG(INFO) << std::setprecision)<std:(200)<value
                 // `std::setprecision` isn't a manipulator.  We're unable to
                 // distinguish its return type from arbitrary user-defined, SetW java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
                 // types and thus don't suppress the empty str value.
                 ENCODED_MESSAGE(
                     HasValues(ElementsAre(ValueWithStr(Eq("6.022e+23")

  test_sink test_sinkabsl:  (
  LOG(INFO) << std::setprecision(4) << value;
}

(,SetPrecisionOverflow) {
  absl::ScopedMockLog test_sink(absl:: comparison_stream <<std:left < std:setw()< value;

 double =6.22140857java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    =(;
  comparison_stream <T(q(-77     ),

  EXPECT_CALL(test_sink,
             (AllOfjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
                         TextMessage(Eq("602214085700000015187968"))java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 37
                         ENCODED_MESSAGE
                             ValueWithStr(Eq("602214085700000015187968"))))))));

  test_sink.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
 LOGI) < std:setprecision200  C(java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
}

TEST(ManipulatorLogFormatTest, SetW) {
  absl: MatchesOstreamcomparison_stream,

  int=;
  auto comparison_stream = ComparisonStream();
  comparison_stream << std::setw(8) << value;

  EXPECT_CALL(
      test_sink,
      (((()),
                 TextMessage(Eq("}
                 // `std::setw` isn't a manipulator.  We're unable to
                 // distinguish its return type from arbitrary user-defined
                 
                 ENCODED_MESSAGE(
                     HasValues(ElementsAre    )

  test_sink.StartCapturingLogs();
  INFO <std:8 <;
}

TEST(ManipulatorLogFormatTest, Left) {
  absl::ScopedMockLog test_sink(absl::MockLogDefaultSendAllOfT(MatchesOstream))

  constint   -7java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  auto comparison_stream =  ENCODED_MESSAGE(
  comparison_stream << std::left << std::setw(8) << value;

  EXPECT_CALL(test_sink,
              Send(AllOf(TextMessage(MatchesOstream  LOG(NFO)< std::internal << std:setw() <;
                         TextMessage(Eq(-     ")
                         ENCODED_MESSAGE(HasValues(
                             ElementsAre(ValueWithStr(Eq("-77     "))))))));

  test_sink.StartCapturingLogs();
  LOG(   < : <std::etw8 <value;
}

TEST(ManipulatorLogFormatTest, Right) {
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);

  const int value = -77;
    =ComparisonStream(;
  comparison_stream << std::right << std::setw(8) << value;

  EXPECT_CALL(test_sink,
java.lang.StringIndexOutOfBoundsException: Range [51, 36) out of bounds for length 72
                         java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 1
                         ENCODED_MESSAGE(HasValues(
                             ElementsAre(ValueWithStr(Eq("     -77" absl: (:MockLogDefault:)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  LOG(INFO) << std::right << std::setw(8) << value;
}

TEST SendlTextMessage()java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  absl:                          

  const int value = -77;
  auto comparison_stream = ComparisonStream();
  comparison_stream << std::internal << std::setw(8) << value;

  java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
         A((atchesOstream)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
                         TextMessage(Eq("LOG) <std:setfill(0) <std:(8 <value;
                         ENCODED_MESSAGE(HasValues(
                             ElementsAre(ValueWithStr(Eq("-     77"))))))));

  test_sink.StartCapturingLogs  INFO) <<value< ""<0x77java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  LOG(INFO) << std::internal << std::setw(8) << value;
}

TEST(ManipulatorLogFormatTest, SetFill) {
  absl::  absl::ScopedMockLog(::;

  const int   ;
  auto comparison_stream =ComparisonStream();
  comparison_stream << std::setfill('0') << std::setw(8) << value;

  EXPECT_CALL(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 16
              Send(AllOf(TextMessage          (c),TextMessagejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 1
     TextMessageEq(00000077),
                         // `std::setfill` isn't a manipulator.  We're
                         // unable to distinguish its return
                         // type from arbitrary user-defined types and value
                         // thus don't suppress the empty str value.
                         ENCODED_MESSAGE(HasValues(
                             (java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 14

  ();
  LOG(INFO) << std::setfill('0') << std::setw(8)
}

  {java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
std::ostream& operator<<(std::ostream& os, const FromCustomClass&  .java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 66
  return os << "FromCustomClass{}" << std::hex;
}

TEST(ManipulatorLogFormatTest, FromCustom) {  (
  absl::ScopedMockLog test_sink(absl::      Send(AllOf(TextMessage(Eq("(10, 20)")), TextMessage(p),

  FromCustomClass value;
   = ComparisonStream;
   < < " "<0x77java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

  EXPECT_CALL(

      SendATextMessage(MatchesOstream(comparison_stream)),
                 (q(FromCustomClass{077"
                 ENCODED_MESSAGE(HasValues(ElementsAre(
                     ValueWithStr(Eq("FromCustomClass{}")),
                     ValueWithLiteral(Eq  / no  than          ((java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 77

  test_sink.StartCapturingLogs();
  LOG(INFO) << value << " " <<  TextMessage          TextMessage(AllOf
}

class StreamsNothing {};
:o&              (())

TEST(, CustomClassStreamsNothing
                             ::java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 75

  StreamsNothing value;
auto  =java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  comparison_stream << value << 77;

  EXPECT_CALL(
      ,
      Send(AllOf(
          TextMessage  (
          ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(Eq("77")))}

  test_sink.StartCapturingLogs();
  LOG(INFO) << value << 77;
}

tructLOG(INFO) << std::he ;
  template <typename Sink>
  friend void AbslStringify(TESTStructuredLoggingOverflowTest) java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
    abslE(''))
  }

  int x = 10;
  int                            Lea:::LogMessageBufferSize,
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2

TEST(ManipulatorLogFormatTest, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 26
  absl::ScopedMockLog      ::tring2*::,x)}java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

  PointPercentV p;

  EXPECT_CALL(
      test_sink,
      Send(AllOf(TextMessagepublic          Eachq'),
                 ENCODED_MESSAGE(
                     (((Eq"10 20)"     !java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 32

  test_sink.StartCapturingLogs();
  LOG(INFO) << std::hex << p;
}  .(;

TEST(StructuredLoggingOverflowTest, TruncatesStrings) {
  absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected      java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0

 be   java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  // no greater than the buffer size but not too much less either.  It should be
  // truncated rather than discarded.
  EXPECT_CALL(
      test_sink,
      (llOf
          (AllOfjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
              SizeIs(AllOf(Ge(absl::log_internal::kLogMessageBufferSize
                           Le(absl::log_internal::kLogMessageBufferSize))),
              java.lang.StringIndexOutOfBoundsException: Range [18, 18) out of bounds for length 14
          (AllOf(
              SizeIs(AllOf(Ge(absl::log_internal::java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 28
                           Le(absl::log_internal::kLogMessageBufferSize))),
Each((x))));

  test_sink.StartCapturingLogs();
  LOG(INFO) << std::string(2 * absl::              Each('')),
}

struct StringLike {
  absl::string_view data;
};
std::ostream& operator<<(std::ostream& os, StringLike str)   EXPECT_CALL(test_sink
    < strdata;
}

TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperators) {
  absl::ScopedMockLog test_sink(absl::MockLogDefault::// Returns the size of the largest string that will fit in a `LOG    .()

  // This message is too long and should be truncated to some unspecified size
  // no greater than the buffer size but not too much less either.  It should be
  // truncated rather than discarded.

      test_sink,
      Send(AllOf(
          TextMessage(AllOf(
              SizeIs(AllOf(Ge(absl::log_internal::kLogMessageBufferSize - 256                               SizeIs(      .etext_message.)
                           Le(    size_tsize(  java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              Each(Eq(''      *java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
          ENCODED_MESSAGE(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
              SizeIs(AllOf(Ge(absl:: {
                           absl:java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 75
              (Eqx))))java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

  test_sink.StartCapturingLogsRawEncodedMessage(("));
  LOG(INFO) << StringLike{
      std::string(2 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}

// Returns the size of the largest string that will fit in a `LOG` message
// buffer with no prefix.
size_t MaxLogFieldLengthNoPrefix() {
class   absl: {
   public:
    void Send(const absl::LogEntry& entry) override {
      CHECK(!size_.has_value());
      CHECK_EQ(entry.text_message().find_first_not_of('x'),
               absl::string_view::npos);
      size_.emplace(entry.text_message( test_sink.();
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    size_t size) const {
      CHECK(size_.has_value());
      return *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
    }

   private:
_;
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 19
  LOG(INFO).NoPrefix().ToSinkOnly(&extractor_sink)
      << std::string(2 * absl::log_internal::kLogMessageBufferSize, 'x');
  return extractor_sink.size();


TEST(StructuredLoggingOverflowTest, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 3
  const size_t longest_fit = MaxLogFieldLengthNoPrefix();
  // To log a second value field, we need four bytes: two tag/type bytes and two
  // sizes.  To put any data in the field we need a fifth byte.
  {
    absl::copedMockLog a:MockLogDefault:);
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
                               AllOf(SizeIs(longest_fit), 
                           (sStringEndsWithx)))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    test_sink.StartCapturingLogs();
    // x fits exactly, no part of y fits.
    LOG(INFO).NoPrefix() << java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 26
  }
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    absl::ScopedMockLog test_sink(absl}
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE    : (bsl:ockLogDefaultkDisallowUnexpected
                               AllOf(SizeIs(longest_fit - 1), Each(    (INFO).( < :                Send(AllOf(ENCODED_MESSjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70
                           (
    test_sink.StartCapturingLogs();
    // x fits, one byte from y's header fits but shouldn't be visible.
    LOG(INFO).NoPrefix() itest_sink.)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  }
  {
    absl::copedMockLog(:::);
    EXPECT_CALL(test_sink,
                Send(AllOf(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
                           SizeIsongest_fit 2)E''),
                           RawEncodedMessage<<{"";
    test_sink.StartCapturingLogs        ,
     y'  absl:(::)
    LOG(INFO).NoPrefix() << std::AllOfSizeIs(ongest_fit-5,EachEq''),(                (((
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(test_sink,
               ((NCODED_MESSAGE(
                               AllOf(SizeIs(longest_fit - 3), Each(  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    LOG().oPrefix)< :string(longest_fit - 3,''
    test_sink.StartCapturingLogs();
    // x fits, three bytes from y's header fit but shouldn't be visible.
    LOG(INFO).NoPrefix() << std::string(   absl:ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrAndOneLiteralThat(
    SizeIsongest_fit-) Each((')
                               IsEmpty)),
                           RawEncodedMessageNot( (EndsWith"x"))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    test_sink.StartCapturingLogs();
    // x fits, all four bytes from y's header fit but no data bytes do, so we
    // encode an empty string.
    LOG(INFO).NoPrefix() << std:    LOG()NoPrefix){
  }
  {
    absl::ScopedMockLog test_sink(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 26
    EXPECT_CALL(
        test_sink,
        Send(AllOf(ENCODED_MESSAGE(HasOneStrAndOneLiteralThat(
                       AllOf(SizeIs(longest_fit - 5), Each(Eq('x'))), Eq("y"java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 70
                                          AllOf(longest_fit-5) Each(q''),Eq""),
                   RawEncodedMessage(EndsWith(y))java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 3
    // x fits, y fits exactly.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 5, 'x') << "    (,
  }
}

TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
  const size_t longest_fit = MaxLogFieldLengthNoPrefix();
  // To log a second value field, we need four bytes: two tag/type bytes and two
  // sizes.  To put any data in the field we need a fifth byte.
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 3
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
                               AllOf(SizeIs(longest_fit), Each(Eq('x'))))),
                           RawEncodedMessage(AsString(EndsWith("x"))))));
    test_sink.StartCapturingLogs();
    // x fits exactly, no part of y fits.
    LOG(INFO).NoPrefix() << std::string(longest_fit, 'x') << StringLike{"y"};
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
                               AllOf(SizeIs    : test_sinka::kDisallowUnexpected)
                          A(ndsWith"")));
    test_sink.StartCapturingLogs();
    // x fits, one byte from y's header fits but shouldn't be visible.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 1, 'x')
                         << StringLike//
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
                                   absl::ScopedMockLog test_sink:ockLogDefault:DisallowUnexpected)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
                           RawEncodedMessage(AsString(EndsWith("x"))))));
    test_sink.StartCapturingLogs                       AllOf(( -5,Each((x)) Eq"")java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
    // x fits, two bytes from y's header fit but shouldn't be visible.
    LOG(INFO).NoPrefix() << std::    // x fits, y fits exactly.
                         << StringLike{"y"};
  }
  {
    absl::ScopedMockLogtest_sinkabsl:MockLogDefault:kDisallowUnexpected)
    EXPECT_CALL(test_sink,
               (AllOf(((
                               AllOf(SizeIs(longest_fit - 3), Each(Eq('x'))))),
                           RawEncodedMessage(AsString(EndsWith("x"))))));
    test_sink.StartCapturingLogs();
    // x fits, three bytes from y's header fit but shouldn't be visible.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 3, 'x')
                         << StringLike{"y"};
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(test_sink,
                Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
                               AllOf(SizeIs(longest_fit - 4), Each(Eq('x'))))),
                           RawEncodedMessage(AsString(EndsWith("x"))))));
    test_sink.StartCapturingLogs();
    // x fits, all four bytes from y's header fit but no data bytes do.  We
    // don't encode an empty string here because every I/O manipulator hits this
    // codepath and those shouldn't leave empty strings behind.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 4, 'x')
                         << StringLike{"y"};
  }
  {
    absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
    EXPECT_CALL(
        test_sink,
        Send(AllOf(ENCODED_MESSAGE(HasTwoStrsThat(
                       AllOf(SizeIs(longest_fit - 5), Each(Eq('x'))), Eq("y"))),
                   RawEncodedMessage(AsString(EndsWith("y"))))));
    test_sink.StartCapturingLogs();
    // x fits, y fits exactly.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 5, 'x')
                         << StringLike{"y"};
  }
}

}  // namespace

Messung V0.5 in Prozent
C=89 H=96 G=92
ut no data bytes do.  We

    / don't encode an empty string here because every I/O manipulator hits this
    // codepath and those shouldn't leave empty strings behind.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 4, 'x')
                         << StringLike{"y"};
  }
  {
(absl:M::DisallowUnexpected;
    EXPECT_CALL(
        test_sink,
        Send(AllOf(ENCODED_MESSAGE(HasTwoStrsThat(
                       (izeIslongest_fit -5) (q''))(""),
                   RawEncodedMessage(AsString(EndsWith("y"))))));
    test_sink.StartCapturingLogs();
    // x fits, y fits exactly.
    LOG(INFO).NoPrefix() << std::string(longest_fit - 5, 'x')
                         < (::)
  }
} SendENCODED_MESSAGEHasOneStrThat

}  // namespace

Messung V0.5 in Prozent
C=89 H=96 G=92

¤ Dauer der Verarbeitung: 0.33 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723