title: How to test Scala macros?
body: <p>What is the proposed way of performing tests on scala macros?</p>
  
  <p>I realize that one needs two projects due to the necessity of separate compilation. This step, if necessary, is acceptable and mostly clear. </p>
  
  <p>But how do you assert a macro expansion fails when it should? Without some special facility, the test case won't compile and therefore the whole test project won't compile.</p>
  
  <p>I think this assert would require another macro of the form </p>
  
  <pre><code>errors(code: =&gt; _): List[CompileError]
  </code></pre>
  
  <p>which returns the compile errors of the inner macro. The same would be required for testing that warnings occur if they should and so on...</p>
  
  <p>Are there some existing testing facilities for Scala macros?</p>