<commit_before>﻿using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Moq;
using NUnit.Framework;
using Cauterize;

namespace Cauterize.Test
{
    class TestFixedArray : CauterizeFixedArrayTyped<long>
    {
        private long[] _data;

        public TestFixedArray()
        {
            Allocate(3);
        }
        public TestFixedArray(long[] data)
        {
            Allocate(data);
        }
        protected override int Size
        {
            get { return 3; }
        }
    }
    [TestFixture]
    public class CauterizeFixedArrayFormatterTest
    {
        [Test]
        public void TestDeserialize()
        {
            var stream = new MemoryStream();
            var factory = new Mock<CauterizeTypeFormatterFactory>();
            var sf = new Mock<ICauterizeTypeFormatter>();
            factory.Setup(f => f.GetFormatter(typeof (Int64))).Returns(sf.Object);
            var counter = 0;
            sf.Setup(f => f.Deserialize(stream, typeof(Int64))).Returns((Stream str, Type t) =>
                {<commit_msg>Removing unused field.<commit_after>﻿using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Moq;
using NUnit.Framework;
using Cauterize;

namespace Cauterize.Test
{
    class TestFixedArray : CauterizeFixedArrayTyped<long>
    {
        public TestFixedArray()
        {
            Allocate(3);
        }
        public TestFixedArray(long[] data)
        {
            Allocate(data);
        }
        protected override int Size
        {
            get { return 3; }
        }
    }
    [TestFixture]
    public class CauterizeFixedArrayFormatterTest
    {
        [Test]
        public void TestDeserialize()
        {
            var stream = new MemoryStream();
            var factory = new Mock<CauterizeTypeFormatterFactory>();
            var sf = new Mock<ICauterizeTypeFormatter>();
            factory.Setup(f => f.GetFormatter(typeof (Int64))).Returns(sf.Object);
            var counter = 0;
            sf.Setup(f => f.Deserialize(stream, typeof(Int64))).Returns((Stream str, Type t) =>
                {
{'fraction_non_alphanumeric': 0.09926470588235294, 'fraction_numerical': 0.006433823529411764, 'mean_word_length': 2.0661971830985917, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '3626741', 'n_tokens_mistral': 619, 'n_tokens_neox': 607, 'n_words': 139}