<commit_before>﻿// Copyright © 2012 Syterra Software Inc. All rights reserved.
// The use and distribution terms for this software are covered by the Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
// which can be found in the file license.txt at the root of this distribution. By using this software in any fashion, you are agreeing
// to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

using fitSharp.Fit.Engine;
using fitSharp.Fit.Operators;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
using NUnit.Framework;

namespace fitSharp.Test.NUnit.Fit {
    [TestFixture] public class ParseSymbolTest : ParseOperatorTest<ParseSymbol> {
        [Test] public void CanParse() {
            Assert.IsTrue(CanParse<string>("<<symbol"), "<<symbol");
            Assert.IsFalse(CanParse<string>("no<<symbol"), "no<<symbol");
            Assert.IsTrue(CanParse<string>("\t<<symbol\r\n"), "\t<<symbol\r\n");
            Assert.IsFalse(CanParse<string>("<nosymbol"), "<nosymbol");
            Assert.IsFalse(CanParse<string>("nosymbol<<"), "nosymbol<<");
        }

        [Test] public void Parse() {
            Parser.Processor.Get<Symbols>().Save("symbol", "symbol value");

            Assert.AreEqual("symbol value", Parse<string>("<<symbol"), "<<symbol");
            Assert.AreEqual("symbol value", Parse<string>("\t<<symbol\r\n"), "\t<<symbol\r\n");
        }

        [Test] public void ParsesTypeFromString() {
            Parser.Processor.Get<Symbols>().Save("symbol", "123.45");
            Assert.AreEqual(123.45, ParseAs<double>("<<symbol"));
        }

        [Test] public void ParseAddsInformationSuffix() {
            Parser.Processor.Get<Symbols>().Save("symbol", "value");

            var cell = new CellTreeLeaf("<<symbol");
            Parser.Parse(typeof(string), TypedValue.Void, cell);
            Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
        }
    }
}
<commit_msg>fix culture-specific test<commit_after>﻿// Copyright © 2012 Syterra Software Inc. All rights reserved.
// The use and distribution terms for this software are covered by the Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
// which can be found in the file license.txt at the root of this distribution. By using this software in any fashion, you are agreeing
// to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

using fitSharp.Fit.Engine;
using fitSharp.Fit.Operators;
using fitSharp.Machine.Engine;
using fitSharp.Machine.Model;
using NUnit.Framework;

namespace fitSharp.Test.NUnit.Fit {
    [TestFixture] public class ParseSymbolTest : ParseOperatorTest<ParseSymbol> {
        [Test] public void CanParse() {
            Assert.IsTrue(CanParse<string>("<<symbol"), "<<symbol");
            Assert.IsFalse(CanParse<string>("no<<symbol"), "no<<symbol");
            Assert.IsTrue(CanParse<string>("\t<<symbol\r\n"), "\t<<symbol\r\n");
            Assert.IsFalse(CanParse<string>("<nosymbol"), "<nosymbol");
            Assert.IsFalse(CanParse<string>("nosymbol<<"), "nosymbol<<");
        }

        [Test] public void Parse() {
            Parser.Processor.Get<Symbols>().Save("symbol", "symbol value");

            Assert.AreEqual("symbol value", Parse<string>("<<symbol"), "<<symbol");
            Assert.AreEqual("symbol value", Parse<string>("\t<<symbol\r\n"), "\t<<symbol\r\n");
        }

        [Test] public void ParsesTypeFromString() {
            Parser.Processor.Get<Symbols>().Save("symbol", 123.45d.ToString());
            Assert.AreEqual(123.45d, ParseAs<double>("<<symbol"));
        }

        [Test] public void ParseAddsInformationSuffix() {
            Parser.Processor.Get<Symbols>().Save("symbol", "value");

            var cell = new CellTreeLeaf("<<symbol");
            Parser.Parse(typeof(string), TypedValue.Void, cell);
            Assert.AreEqual(" value", cell.Value.GetAttribute(CellAttribute.InformationSuffix));
        }
    }
}

{'fraction_non_alphanumeric': 0.1508228936379268, 'fraction_numerical': 0.007860476541390321, 'mean_word_length': 3.2549634273772203, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 27, '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': '1881153', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1137, 'n_words': 286}