This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Towards typesafe native Scala mocks

No replies
paulbutcher
Joined: 2010-03-08,
User offline. Last seen 10 weeks 5 days ago.

Borachio, my native mocking library for Scala, works well enough but has a couple of annoying limitations:

- It can only mock functions and traits (interfaces). No support for classes, companion objects, constructors, etc. etc. etc.

- It’s not typesafe.

I've been working on a compiler plugin to address those limitations and, although I’m far from done, I’ve made enough progress to be worth reporting.

There's a writeup of on my blog:

http://www.paulbutcher.com/2011/06/towards-typesafe-native-scala-mocks/

I'd be very interested in feedback. If anyone who knows more about compiler internals and/or plugins than I do fancies casting an eye over the plugin and letting me know about anything that could be done better, I'd be very grateful indeed.

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: paul@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland