<commit_before>﻿using NAudio.CoreAudioApi;
using System.Diagnostics;
using System.IO;
using WCS.MAIN.Functions;
using WCS.MAIN.Globals;
using Xunit;

namespace WCS.TEST
{
    public class CompatibleFactAttribute : FactAttribute
    {
        private readonly OS platform;
        private const int NODESKTOP_HRESULT = -2146233036;
        private const string WRONG_PLATFORM = "Your platform is not suitable for this test !";
        private const string NO_MASTER_MIXER = "Couldn't find a master mixer !";
        private const string NO_DESKTOP = "Your platform doesn't have a desktop !";
        private const string NO_ALSA = "Linux Audio Tests requires AlsaMixer and libraries.";
        private const string NO_SOUND_CARD = "Your system doesn't have a soundcard.";
        public CompatibleFactAttribute(OS id, bool requiresDesktop)
        {
            platform = id;
            if (id != OS.CROSSPLATFORM) // No need to check any platform and master mixer for cross platform functions.
            {
                if (!platformCheck())
                    Skip += " " + WRONG_PLATFORM;
                if (id == OS.WINDOWS && !masterMixerEnabled())
                    Skip += " " + NO_MASTER_MIXER;
                //if (id == OS.LINUX && !checkALSA())
                //    Skip += " " + NO_ALSA;
                if (id == OS.LINUX && !checkSoundCard())
                    Skip += " " + NO_SOUND_CARD;
            }<commit_msg>Testing after libasound2-dev installation on travis<commit_after>﻿using NAudio.CoreAudioApi;
using System.Diagnostics;
using System.IO;
using WCS.MAIN.Functions;
using WCS.MAIN.Globals;
using Xunit;

namespace WCS.TEST
{
    public class CompatibleFactAttribute : FactAttribute
    {
        private readonly OS platform;
        private const int NODESKTOP_HRESULT = -2146233036;
        private const string WRONG_PLATFORM = "Your platform is not suitable for this test !";
        private const string NO_MASTER_MIXER = "Couldn't find a master mixer !";
        private const string NO_DESKTOP = "Your platform doesn't have a desktop !";
        private const string NO_ALSA = "Linux Audio Tests requires AlsaMixer and libraries.";
        private const string NO_SOUND_CARD = "Your system doesn't have a soundcard.";
        public CompatibleFactAttribute(OS id, bool requiresDesktop)
        {
            platform = id;
            if (id != OS.CROSSPLATFORM) // No need to check any platform and master mixer for cross platform functions.
            {
                if (!platformCheck())
                    Skip += " " + WRONG_PLATFORM;
                if (id == OS.WINDOWS && !masterMixerEnabled())
                    Skip += " " + NO_MASTER_MIXER;
                //if (id == OS.LINUX && !checkALSA())
                //    Skip += " " + NO_ALSA;
                //if (id == OS.LINUX && !checkSoundCard())
                //    Skip += " " + NO_SOUND_CARD;
            }
{'fraction_non_alphanumeric': 0.09193438140806562, 'fraction_numerical': 0.007177033492822967, 'mean_word_length': 2.157497303128371, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1872388', 'n_tokens_mistral': 847, 'n_tokens_neox': 797, 'n_words': 253}