New issue report by azizatif:
Unit tests need to ensure that all LINQ operators do not consume a source
more than once. In other words, given a source of type IEnumerable<T>, the
operator should never call GetEnumerator more than once. For example, the
following implementation of Average would be wrong:
public static double Average (this IEnumerable<int> source)
{
return (double) source.Sum() / source.Count();
}
The reliance on Sum and Count would cause the source to be iterate twice.
The rationale to ensure this is that once cannot assume that the source
sequence can be rewound (e.g. the source data is directly coming from a
serial device).
Issue attributes:
Status: New
Owner: ----
CC: dominik....@skybow.com
Labels: Type-Task Priority-Medium Component-Tests
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 by azizatif:
(No comment was entered for this change.)
Issue attribute updates:
Status: Started
Owner: dominik....@skybow.com
Cc: -dominik....@skybow.com
Comment #2 by azizatif:
Started in r117 and r118.
Comment #3 by dominik....@skybow.com:
Fixed in r128.
Issue attribute updates:
Status: Fixed