Skip to content

Problem with pure boundary analysis #4

Description

@verement

The pure boundary analysis API seems to have a problem in that it can produce different results when given identical arguments.

The following example illustrates the problem:

{-# LANGUAGE OverloadedStrings #-}

module Main where

import Control.Monad
import Data.Monoid
import Data.Text.ICU

main = do
  let x  = "foobar"
      x' = foldr (\_ x -> x <> x) x [1..15]
  forM_ [1..10] $ \_ -> print $ length (charBreaks x')

charBreaks = breaks (breakCharacter Current)

When I run this, I get (in one instance):

196419
196392
196416
196549
196469
196565
196449
196258
196247
196373

Any idea what might be going wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions