Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4148

_TestUtil should be able to generate random longs

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA, 6.0
    • Component/s: general/test
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      It would be helpful in TestPackedInts at least, in order to generate random values (as a workaround, we currently generate a random int between 0 and min(Integer.MAX_VALUE, PackedInts.maxValue(bitsPerValue)). Moreover, it would help to fix nextInt for large ranges (calling nextInt(random, -10, Integer.MAX_VALUE) or even nextInt(random, 0, Integer.MAX_VALUE) currently fails because the range of values is > Integer.MAX_VALUE.

        Attachments

          Activity

            People

            • Assignee:
              jpountz Adrien Grand
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: