Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 21, 2019 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/93772e7e20fa5fa3afac0c78a9546e37 to your computer and use it in GitHub Desktop.
Save IntegerMan/93772e7e20fa5fa3afac0c78a9546e37 to your computer and use it in GitHub Desktop.
module MattEland.FSharpGeneticAlgorithm.Tests
open Xunit
open MattEland.FSharpGeneticAlgorithm.Logic.WorldPos
[<Theory>]
[<InlineData(4, 2, 4, 1, true)>]
[<InlineData(4, 2, 4, 0, false)>]
let ``Point Adjaency Tests`` (x1, y1, x2, y2, expectedAdjacent) =
// Arrange
let pos1 = newPos x1 y1
let pos2 = newPos x2 y2
// Act
let isAdjacent = isAdjacentTo pos1 pos2
// Assert
Assert.Equal(expectedAdjacent, isAdjacent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment