<commit_before>﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using NeoSmart.Unicode;
using System.Linq;

namespace UnicodeTests
{
    [TestClass]
    public class EmojiTests
    {
        [TestMethod]
        public void TestEmojiCreation()
        {
            SingleEmoji FaceWithTearsOfJoy = new SingleEmoji(
               sequence: new UnicodeSequence("1F602"),
               name: "face with tears of joy",
               searchTerms: new[] { "face", "tears", "joy" },
               sortOrder: 2
            );

            Assert.IsTrue(FaceWithTearsOfJoy.Sequence.Codepoints.Count() == 1);
            Assert.AreEqual(FaceWithTearsOfJoy.Sequence.Codepoints.First().ToString(), "U+1F602");
            Assert.AreEqual(FaceWithTearsOfJoy.Name, "face with tears of joy");
            Assert.IsTrue(FaceWithTearsOfJoy.SearchTerms.SequenceEqual(new[] { "face", "tears", "joy" }));
        }

        [TestMethod]
        public void TestEmojiCount()
        {
            Assert.AreNotEqual(0, Emoji.All.Count);
            Assert.AreNotEqual(Emoji.Basic.Count, Emoji.All.Count);
            Assert.IsTrue(Emoji.Basic.Count < Emoji.All.Count);
        }

        [TestMethod]<commit_msg>Add tests to guarantee interning of emoji group/subgroups<commit_after>﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NeoSmart.Unicode;
using System.Linq;

namespace UnicodeTests
{
    [TestClass]
    public class EmojiTests
    {
        [TestMethod]
        public void TestEmojiCreation()
        {
            SingleEmoji FaceWithTearsOfJoy = new SingleEmoji(
               sequence: new UnicodeSequence("1F602"),
               name: "face with tears of joy",
               searchTerms: new[] { "face", "tears", "joy" },
               sortOrder: 2
            );

            Assert.IsTrue(FaceWithTearsOfJoy.Sequence.Codepoints.Count() == 1);
            Assert.AreEqual(FaceWithTearsOfJoy.Sequence.Codepoints.First().ToString(), "U+1F602");
            Assert.AreEqual(FaceWithTearsOfJoy.Name, "face with tears of joy");
            Assert.IsTrue(FaceWithTearsOfJoy.SearchTerms.SequenceEqual(new[] { "face", "tears", "joy" }));
        }

        [TestMethod]
        public void EmojiGroupInterning()
        {
            var faceWithTearsOfJoy = Emoji.FaceWithTearsOfJoy;
            var grinningFace = Emoji.GrinningFace;

            Assert.AreEqual(faceWithTearsOfJoy.Group, grinningFace.Group);
            Assert.AreSame(faceWithTearsOfJoy.Group, grinningFace.Group);
            Assert.IsTrue(String.IsInterned(faceWithTearsOfJoy.Group) is not null);
        }

        [TestMethod]
        public void EmojiSubgroupInterning()
        {
            var faceWithTearsOfJoy = Emoji.FaceWithTearsOfJoy;
            var grinningFace = Emoji.GrinningFace;

            Assert.AreEqual(faceWithTearsOfJoy.Subgroup, grinningFace.Subgroup);
            Assert.AreSame(faceWithTearsOfJoy.Subgroup, grinningFace.Subgroup);
            Assert.IsTrue(String.IsInterned(faceWithTearsOfJoy.Subgroup) is not null);
        }

        [TestMethod]
        public void TestEmojiCount()
        {
            Assert.AreNotEqual(0, Emoji.All.Count);
            Assert.AreNotEqual(Emoji.Basic.Count, Emoji.All.Count);
            Assert.IsTrue(Emoji.Basic.Count < Emoji.All.Count);
        }

        [TestMethod]
{'fraction_non_alphanumeric': 0.10419161676646707, 'fraction_numerical': 0.006586826347305389, 'mean_word_length': 2.378159757330637, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2443171', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1012, 'n_words': 166}