Search code examples
googletest

How to print more than 32 values?


Anyone know how to print more than 32 values? My output looks like this, and I'm trying to make it show the rest of the array:

Value of: model.GetOutput(0)
Expected: contains 64 values, where each value and its corresponding value in { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ... } are an almost-equal pair
  Actual: { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... }, where the value pair (1, 2) at index #1 don't match, which is 1 from 1

Solution

  • It's hard-coded in the Google Test sources (kMaxCount = 32). To change it, you have to modify the code and rebuild Google Test. You might be able to define your own printer if the type is specific enough.