<div dir="ltr"><div><div><span style="font-family:arial,sans-serif;font-size:small">> Is it not possible to unit test GHC?</span><br></div><div><div><br></div><div>You need to export functions you want to test, and then write a program that</div><div>tests those functions using the `ghc` package.</div><div><br></div><div>See</div><div><a href="https://github.com/ghc/ghc/blob/master/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs">https://github.com/ghc/ghc/blob/master/testsuite/tests/unboxedsums/unboxedsums_unit_tests.hs</a></div><div>for an example.</div></div></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">2016-10-11 17:50 GMT-04:00 Thomas Jakway <span dir="ltr"><<a href="mailto:tjakway@nyu.edu" target="_blank">tjakway@nyu.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>I read somewhere that fixing the graph register allocator would
be a good project so I thought I'd look into it. I couldn't find
any tickets about it on Trac though so I was poking around for
tests to see what (if anything) was wrong with it.</p>
<p>After I sent that last email I googled around for how to write
ghc unit tests and <a href="https://mail.haskell.org/pipermail/ghc-devs/2014-January/003916.html" target="_blank">this</a>
is the only thing I found. Is it not possible to unit test GHC?
If not are there plans/discussions about this? I think it'd help
document the code base if nothing else and it'd be a good way to
get my feet wet.<br>
</p><div><div class="gmail-h5">
<div class="gmail-m_-1268597177061016814moz-cite-prefix">On 10/11/2016 02:13 PM, Ben Gamari
wrote:<br>
</div>
<blockquote type="cite">
<pre>Thomas Jakway <a class="gmail-m_-1268597177061016814moz-txt-link-rfc2396E" href="mailto:tjakway@nyu.edu" target="_blank"><tjakway@nyu.edu></a> writes:
</pre>
<blockquote type="cite">
<pre>Can anyone point me to the register allocator tests (especially for the
graph register allocator)? Can't seem to find them and grepping doesn't
turn up much (pretty much just
testsuite/tests/codeGen/<wbr>should_run/cgrun028.h).
</pre>
</blockquote>
<pre>What sort of tests are you looking for in particular? I'm afraid all we
have are regression tests covering the code generator as a whole.
Cheers,
- Ben
</pre>
</blockquote>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div></div>