Adds AdjoinedUnit Ring #130

Merged
merged 2 commits into from Feb 25, 2013

Projects

None yet

2 participants

@johnynek
Collaborator

No description provided.

@johnynek
Collaborator

Addresses: #47

@sritchie sritchie commented on the diff Feb 25, 2013
...est/scala/com/twitter/algebird/AdJoinedUnitRing.scala
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package com.twitter.algebird
+
+import org.scalacheck.Arbitrary
+import org.scalacheck.Arbitrary.arbitrary
+import org.scalacheck.Properties
+import org.scalacheck.Gen.choose
+
+object AdjoinedRingSpecification extends Properties("AdjoinedRing") {
+ import BaseProperties._
+
+ implicit def adjoined[T:Arbitrary]: Arbitrary[AdjoinedUnit[T]] = Arbitrary {
+ implicitly[Arbitrary[T]].arbitrary.map { t => AdjoinedUnit(t) }
@sritchie
sritchie Feb 25, 2013 Collaborator

Arbitrary.arbitrary[T].map

@sritchie sritchie merged commit 9f24431 into develop Feb 25, 2013

1 check passed

default The Travis build passed
Details
@sritchie sritchie deleted the feature/adjoin-ring branch Feb 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment