Day 19 (#19)
Can't be bothered to get it faster Co-authored-by: Smaug123 <patrick+github@patrickstevens.co.uk> Reviewed-on: #19
This commit is contained in:
20
AdventOfCode2023.FSharp/Test/TestList.fs
Normal file
20
AdventOfCode2023.FSharp/Test/TestList.fs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Test
|
||||
|
||||
open NUnit.Framework
|
||||
open FsUnitTyped
|
||||
open FsCheck
|
||||
open AdventOfCode2023
|
||||
|
||||
[<TestFixture>]
|
||||
module TestList =
|
||||
|
||||
[<Test>]
|
||||
let ``n-tuples have the right length`` () =
|
||||
let property (n : int) (xs : char list) =
|
||||
let n = min (abs n) 6
|
||||
let xs = xs |> List.take (min 10 xs.Length)
|
||||
let tuples = List.nTuples n xs
|
||||
tuples |> List.forall (fun i -> i.Length = n)
|
||||
|
||||
property 1 [ 'v' ] |> shouldEqual true
|
||||
Check.QuickThrowOnFailure property
|
Reference in New Issue
Block a user