Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/TestBoard.flix
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ mod TestBoard {
let boardString = rowStrings |> String.unlines;
Flixball.BoardLibrary.fromString(boardString)

@test
@Test
def testDimensions(): Bool = match testBoard01() {
case Err(_) => false
case Ok(Board(br)) =>
br#rows == 5+2 and br#cols == 10+2
}

@test
@Test
def testTiles(): Bool = match testBoard01() {
case Err(_) => false
case Ok(Board(br)) =>
Expand All @@ -63,19 +63,19 @@ mod TestBoard {
check(3, 5, None)
}

@test
@Test
def testBorder(): Bool = match testBoard01() {
case Err(_) => false
case Ok(b) => hasBorder(b)
}

@test
@Test
def testInboundCoordinates(): Bool = match testBoard01() {
case Err(_) => false
case Ok(b) => inboundTiles(b)
}

@test
@Test
def testError(): Bool =
match " # \n v \n# Q " |> Flixball.BoardLibrary.fromString {
case Err(_) => true
Expand Down
4 changes: 2 additions & 2 deletions test/TestNoise.flix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mod TestNoise {

@test
@Test
def testBoolNoise2d01(): Bool = region r {
let ans = Flixball.Noise.boolNoise2d(r, {width=5, height=4}, 512i64, 0.0);
ans |> Array.forAll(Array.forAll(b -> b == false))
}

@test
@Test
def testBoolNoise2d02(): Bool = region r {
let ans = Flixball.Noise.boolNoise2d(r, {width=5, height=4}, 512i64, 1.0);
ans |> Array.forAll(Array.forAll(b -> b == true))
Expand Down
10 changes: 5 additions & 5 deletions test/TestOptions.flix
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ mod TestOptions {
use Flixball.Options.Action;
use Flixball.Options.RunOption;

@test
@Test
def testEmpty(): Bool = {
let input = Nil;
parse(input) == Action.Run(Nil, Nil)
}

@test
@Test
def testRunWithConfig(): Bool = {
let input = "--config" :: "flixball.cfg" :: Nil;
parse(input) == Action.Run(RunOption.Config("flixball.cfg") :: Nil, Nil)
}

@test
@Test
def testRunWithSeed(): Bool = {
let input = "--seed" :: "12345" :: Nil;
parse(input) == Action.Run(RunOption.Seed(12345i64) :: Nil, Nil)
}

@test
@Test
def testVersion(): Bool = {
let input = "--version" :: Nil;
parse(input) == Action.Version
}

@test
@Test
def testHelp(): Bool = {
let input = "--help" :: Nil;
parse(input) == Action.Help
Expand Down
Loading