On 02.06.2015 12:15, Paul Sandoz wrote:
On Jun 2, 2015, at 10:56 AM, Ivan Gerasimov <ivan.gerasi...@oracle.com> wrote:
You could simplify the data provider sourceTargetReplacementWithNull, there is 
no point testing with a null source. String.replace accepts two arguments, each 
can be either null or non-null. Thats 2 bits of state, so one can simply be 
explicit and presumably it should not matter what the non-null argument value 
(there are enough non-null values supplied by the other data providers):

   {null, null}
   {null, "foo"}
   {"foo", null}
I agree there is not much value in testing the case source == null, so it can 
be removed.
However, I would leave other test cases.
Earlier in this thread Rémi spotted a bug, which had been observed in a call "bar".replace("foo", 
null), but not in "foo".replace("foo", null).

Ok, presumably for the same identity rather than value?

For any valid substring, so "foobar".replace("bar", null) wouldn't have thrown OOM, even though it should have. Surely, the current testcases often duplicate each other, but it seems to be easier to process them all then to filter the duplicates out.

Sincerely yours,
Ivan

Paul.





Reply via email to