Skip to content

Instantly share code, notes, and snippets.

@deusaquilus
Created August 15, 2019 16:07
Show Gist options
  • Save deusaquilus/b3556a72571a142f40b364de60fcc397 to your computer and use it in GitHub Desktop.
Save deusaquilus/b3556a72571a142f40b364de60fcc397 to your computer and use it in GitHub Desktop.
Scalatest - Compare Quill AST Opinions Neutralized
implicit def astEq[T <: io.getquill.ast.Ast](implicit tt: scala.reflect.runtime.universe.TypeTag[T]) =
new Equality[T] {
def areEqual(a: T, b: Any): Boolean =
b match {
case p: io.getquill.ast.Ast => p.neutralize == a.neutralize
case _ => false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment