<commit_before>module DiamondProperties

// Following along Ploeh's Pluralsight course...

open System
open FsCheck
open FsCheck.Xunit

let make letter = "<NAME>ocat"


type Letters =
    static member Chars () =
        Arb.Default.Char()
        |> Arb.filter (fun c -> 'A' <= c && c <= 'Z')

type DiamondPropertyAttribute () =
    inherit PropertyAttribute(Arbitrary = [| typeof<Letters> |])

[<DiamondProperty>]
let ``Dimaond is non empty`` (letter: char) =
    // printfn "%c" letter
    let actual = make letter
    not (String.IsNullOrWhiteSpace actual)

<commit_msg>added helper function for split<commit_after>module DiamondProperties

// Following along Ploeh's Pluralsight course...

open System
open FsCheck
open FsCheck.Xunit

let make letter = "Devil's advocat"


type Letters =
    static member Chars () =
        Arb.Default.Char()
        |> Arb.filter (fun c -> 'A' <= c && c <= 'Z')

type DiamondPropertyAttribute () =
    inherit PropertyAttribute(Arbitrary = [| typeof<Letters> |])

let split (s : string) =
    s.Split([| Environment.NewLine |], StringSplitOptions.None)

[<DiamondProperty>]
let ``Dimaond is non empty`` (letter: char) =
    // printfn "%c" letter
    let actual = make letter
    not (String.IsNullOrWhiteSpace actual)


{'fraction_non_alphanumeric': 0.1260904044409199, 'fraction_numerical': 0.0, 'mean_word_length': 3.507142857142857, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '642377', 'n_tokens_mistral': 406, 'n_tokens_neox': 395, 'n_words': 118}