Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-364

Workaround for a Mono float/Single parsing issue

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Mono 2.6.x

    Description

      Mono is not able to parse values greater or equal to Single.MaxValues correctly, e.g.:

      Single.Parse(Single.MaxValue.ToString()) throws an OverflowException.

      Since Test/Search/TestSort.cs is using such a value, all of its tests are failing.

      I'm aware that this issue must be fixed in Mono (it's a known issue), but since TestSort is not about testing foat's accuracy, I'm attaching a patch the lets the tests pass on Mono. Please take it into consideration.

      Attachments

        1. TestSort.diff
          2 kB
          Robert Jordan

        Activity

          People

            digydigy Digy
            robertj@gmx.net Robert Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: