calvert1991/googlemock

need container matcher WhenSorted(m)

Closed this issue · 2 comments

ElementsAre() only works for ordered containers.  It's useful to have a matcher 
WhenSorted(m) which matches a container that, when sorted in ascending order, 
matches m, e.g.

  WhenSorted(ElementsAre(1, Gt(3), Gt(42)))

Also useful is a generalization of WhenSorted() that takes a custom comparator:

  WhenSortedBy(comparator, m)

Original issue reported on code.google.com by w...@google.com on 14 Jun 2010 at 4:14

Original comment by w...@google.com on 13 Sep 2011 at 8:35

  • Changed state: Started
fixed in r397.

Original comment by w...@google.com on 16 Sep 2011 at 4:56

  • Changed state: Fixed