If you're OK with unicode, you can also use ≟ instead of ===.
On Thursday, March 24, 2016 at 10:52:33 AM UTC-7, Shing Hing Man wrote:
>
> Hi,
> I am using ScalaZ 7.1.3.
>
> I am trying to write a simple test case for Scalaz === with ScalaTest.
>
>
> import org.scalactic.TripleEquals.{convertToEqualizer => _}
> import scalaz.Scalaz._
> import scalaz._
> import org.scalatest.{Matchers, WordSpec}
>
> class TypeClasses2Test extends WordSpec with Matchers{
>
>
> "Strings" should {
> "be equals" in{
>
>
> "Hello" === "olleH".reverse should be (true)
>
> }
> }
> }
>
> Error:(19, 8) type mismatch;
> found : String("Hello")
> required: ?{def ===(x$1: ? >: String): ?}
> Note that implicit conversions are not applicable because they are
> ambiguous:
> both method ToEqualOps in trait ToEqualOps of type [F](v: F)(implicit F0:
> scalaz.Equal[F])scalaz.syntax.EqualOps[F]
> and method convertToEqualizer in trait TripleEquals of type [T](left:
> T)TypeClasses2Test.this.Equalizer[T]
> are possible conversion functions from String("Hello") to ?{def ===(x$1:
> ? >: String): ?}
> "Hello" === "olleH".reverse should be (true)
> ^
>
>
> There is another implicit conversion for === from
> org.scalactic.TripleEquals.convertToEqualizer, which I tried to exclude.
> But
> import org.scalactic.TripleEquals.{convertToEqualizer => _}
>
> does not seem to work.
>
> It would be appreciated if someone can give me a pointer on how to get
> the test case working.
>
> Thanks in advance for any assistance !
>
> Shing
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"scalaz" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/scalaz.
For more options, visit https://groups.google.com/d/optout.