<commit_before>﻿using DotNetEngine.Engine;
using NUnit.Framework;

namespace DotNetEngine.Test
{
    /// <summary>
    /// These are the Perft tests that validate the move path enumeration. Caution: They take awhile to run all of them.
    /// </summary>
    public class PerftTests
    {
        private readonly MoveData _moveData = new MoveData();
        
      

        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 0, 1)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 1, 20)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 2, 400)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 3, 8902)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 4, 197281)]
        //[TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 5, 4865609)]
        //[TestCase("rnbqkbnr/ppppp2p/8/5PpQ/8/8/PPPP1PPP/RNB1KBNR b KQkq - 0 3", 1, 1)]
        public void RunPerft(string fen, int depth, long moveCount)
        {
            var gameState = GameStateUtility.LoadGameStateFromFen(fen);
            var perftData = new PerftData();
            var count = gameState.RunPerftRecursively(_moveData, perftData, 1, depth);            
            Assert.That(count, Is.EqualTo(moveCount));
        }

        //[TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 5)]
        //[TestCase("rnbqkbnr/pppppppp/8/8/8/2N5/PPPPPPPP/R1BQKBNR b KQkq - 1 1", 4)]
        //[TestCase("rnbqkbnr/p1pppppp/8/1p6/8/N7/PPPPPPPP/R1BQKBNR w KQkq b6 0 2", 4)] //B7B5 Divide
        //[TestCase("rnbqkbnr/p1pppppp/8/1p6/2N5/8/PPPPPPPP/R1BQKBNR b KQkq - 1 2", 5)] //A3C4 Divide
        //[TestCase("rnbqkbnr/p1pppppp/8/8/2p5/8/PPPPPPPP/R1BQKBNR w KQkq - 0 3", 5)]
        public void RunDivide(string fen, int depth)
        {
            var gameState = GameStateUtility.LoadGameStateFromFen(fen);
            var perftData = new PerftData();
            var result = gameState.CalculateDivide(_moveData, perftData, 1, depth);         
        }
    }
}<commit_msg>Fixed a build issue<commit_after>﻿using DotNetEngine.Engine;
using NUnit.Framework;

namespace DotNetEngine.Test
{
    /// <summary>
    /// These are the Perft tests that validate the move path enumeration. Caution: They take awhile to run all of them.
    /// </summary>
    public class PerftTests
    {
        private readonly MoveData _moveData = new MoveData();
        
      

        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 0, 1)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 1, 20)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 2, 400)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 3, 8902)]
        [TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 4, 197281)]
        //[TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 5, 4865609)]
        //[TestCase("rnbqkbnr/ppppp2p/8/5PpQ/8/8/PPPP1PPP/RNB1KBNR b KQkq - 0 3", 1, 1)]
        public void RunPerft(string fen, int depth, long moveCount)
        {
            var gameState = GameStateUtility.LoadGameStateFromFen(fen);
            var perftData = new PerftData();
            var count = gameState.RunPerftRecursively(_moveData, perftData, 1, depth);            
            Assert.That(count, Is.EqualTo(moveCount));
        }

        //[TestCase("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", 5)]
        //[TestCase("rnbqkbnr/pppppppp/8/8/8/2N5/PPPPPPPP/R1BQKBNR b KQkq - 1 1", 4)]
        //[TestCase("rnbqkbnr/p1pppppp/8/1p6/8/N7/PPPPPPPP/R1BQKBNR w KQkq b6 0 2", 4)] //B7B5 Divide
        //[TestCase("rnbqkbnr/p1pppppp/8/1p6/2N5/8/PPPPPPPP/R1BQKBNR b KQkq - 1 2", 5)] //A3C4 Divide
        //[TestCase("rnbqkbnr/p1pppppp/8/8/2p5/8/PPPPPPPP/R1BQKBNR w KQkq - 0 3", 5)]
        public void RunDivide(string fen, int depth)
        {
            var gameState = GameStateUtility.LoadGameStateFromFen(fen);
            var perftData = new PerftData();
            gameState.CalculateDivide(_moveData, perftData, 1, depth);         
        }
    }
}
{'fraction_non_alphanumeric': 0.1380375386077453, 'fraction_numerical': 0.06177239249227845, 'mean_word_length': 2.3653077537969622, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 38, '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': '2862261', 'n_tokens_mistral': 1935, 'n_tokens_neox': 1787, 'n_words': 327}