<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using KLibrary.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTest.Linq
{
    [TestClass]
    public class CompositionTest
    {
        [TestMethod]
        public void ZipForShort_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual1 = range1.ZipForShort(range2).ToArray();
            Assert.AreEqual(length1, actual1.Length);

            var actual2 = range2.ZipForShort(range1).ToArray();
            Assert.AreEqual(length1, actual2.Length);
        }

        [TestMethod]
        public void ZipForLong_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual1 = range1.ZipForLong(range2).ToArray();
            Assert.AreEqual(length2, actual1.Length);
            Assert.AreEqual(0, actual1[length2 - 1].Item1);

            var actual2 = range2.ZipForLong(range1).ToArray();
            Assert.AreEqual(length2, actual2.Length);
            Assert.AreEqual(0, actual2[length2 - 1].Item2);
        }

        [TestMethod]
        public void ZipForFirst_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual1 = range1.ZipForFirst(range2).ToArray();
            Assert.AreEqual(length1, actual1.Length);

            var actual2 = range2.ZipForFirst(range1).ToArray();
            Assert.AreEqual(length2, actual2.Length);
            Assert.AreEqual(0, actual2[length2 - 1].Item2);
        }
    }
}<commit_msg>Add test<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using KLibrary.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UnitTest.Linq
{
    [TestClass]
    public class CompositionTest
    {
        [TestMethod]
        public void ZipForShort_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual0 = range1.ZipForShort(range1).ToArray();
            Assert.AreEqual(length1, actual0.Length);

            var actual1 = range1.ZipForShort(range2).ToArray();
            Assert.AreEqual(length1, actual1.Length);

            var actual2 = range2.ZipForShort(range1).ToArray();
            Assert.AreEqual(length1, actual2.Length);
        }

        [TestMethod]
        public void ZipForLong_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual0 = range1.ZipForLong(range1).ToArray();
            Assert.AreEqual(length1, actual0.Length);

            var actual1 = range1.ZipForLong(range2).ToArray();
            Assert.AreEqual(length2, actual1.Length);
            Assert.AreEqual(0, actual1[length2 - 1].Item1);

            var actual2 = range2.ZipForLong(range1).ToArray();
            Assert.AreEqual(length2, actual2.Length);
            Assert.AreEqual(0, actual2[length2 - 1].Item2);
        }

        [TestMethod]
        public void ZipForFirst_1()
        {
            var length1 = 9;
            var length2 = 10;
            var range1 = Enumerable.Range(1, length1);
            var range2 = Enumerable.Range(1, length2);

            var actual0 = range1.ZipForFirst(range1).ToArray();
            Assert.AreEqual(length1, actual0.Length);

            var actual1 = range1.ZipForFirst(range2).ToArray();
            Assert.AreEqual(length1, actual1.Length);

            var actual2 = range2.ZipForFirst(range1).ToArray();
            Assert.AreEqual(length2, actual2.Length);
            Assert.AreEqual(0, actual2[length2 - 1].Item2);
        }
    }
}
{'fraction_non_alphanumeric': 0.10709958807850739, 'fraction_numerical': 0.04288829658347468, 'mean_word_length': 2.0153396639883128, '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': '4320825', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1208, 'n_words': 234}