Skip to content

Instantly share code, notes, and snippets.

@johandahlberg
Created April 25, 2013 13:33
Show Gist options
  • Save johandahlberg/5459719 to your computer and use it in GitHub Desktop.
Save johandahlberg/5459719 to your computer and use it in GitHub Desktop.
Unit test example for the BetterCodeExample burrows wheeler functions
import org.scalatest.FunSuite
import BetterCodeExample._
class BetterCodeExampleUnitTests extends FunSuite {
test("Burrow wheelers transform of ^BANANA|") {
assert(BetterCodeExample.burrowsWheelersTransform("^BANANA|") === """BNN^AA|A""")
}
test("Burrow wheelers transform of a empty string") {
intercept[IllegalArgumentException] {
(BetterCodeExample.burrowsWheelersTransform(""))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment