<commit_before>﻿using NBitcoin.Crypto;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace NBitcoin.Tests
{
	class AssertEx
	{
		[DebuggerHidden]
		internal static void Error(string msg)
		{
			Assert.False(true, msg);
		}
		[DebuggerHidden]
		internal static void Equal<T>(T actual, T expected)
		{
			Assert.Equal(expected, actual);
		}
		[DebuggerHidden]
		internal static void CollectionEquals<T>(T[] actual, T[] expected)
		{
			if (actual.Length != expected.Length)
				Assert.False(true, "Actual.Length(" + actual.Length + ") != Expected.Length(" + expected.Length + ")");

			for (int i = 0; i < actual.Length; i++)
			{
				if (!Object.Equals(actual[i], expected[i]))
					Assert.False(true, "Actual[" + i + "](" + actual[i] + ") != Expected[" + i + "](" + expected[i] + ")");
			}
		}

		[DebuggerHidden]
		internal static void StackEquals(ContextStack<byte[]> stack1, ContextStack<byte[]> stack2)
		{
			var hash1 = stack1.Select(o => Hashes.DoubleSHA256(o)).ToArray();
			var hash2 = stack2.Select(o => Hashes.DoubleSHA256(o)).ToArray();
			AssertEx.CollectionEquals(hash1, hash2);
		}
		[DebuggerHidden]
		internal static void EqualBytes(ReadOnlySpan<byte> expected, ReadOnlySpan<byte> actual)
		{
			var aa = DataEncoders.Encoders.Hex.EncodeData(expected);
			var bb = DataEncoders.Encoders.Hex.EncodeData(actual);
			Assert.Equal(aa, bb);
		}
		[DebuggerHidden]
		internal static void EqualBytes(string expected, ReadOnlySpan<byte> actual)
		{
			var bb = DataEncoders.Encoders.Hex.EncodeData(actual);
			Assert.Equal(expected.ToLowerInvariant(), bb);
		}
		[DebuggerHidden]
		internal static void EqualBytes(ReadOnlySpan<byte> expected, string actual)
		{
			var aa = DataEncoders.Encoders.Hex.EncodeData(expected);
			Assert.Equal(aa, actual.ToLowerInvariant());
		}<commit_msg>Fix build for no span support<commit_after>﻿using NBitcoin.Crypto;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace NBitcoin.Tests
{
	class AssertEx
	{
		[DebuggerHidden]
		internal static void Error(string msg)
		{
			Assert.False(true, msg);
		}
		[DebuggerHidden]
		internal static void Equal<T>(T actual, T expected)
		{
			Assert.Equal(expected, actual);
		}
		[DebuggerHidden]
		internal static void CollectionEquals<T>(T[] actual, T[] expected)
		{
			if (actual.Length != expected.Length)
				Assert.False(true, "Actual.Length(" + actual.Length + ") != Expected.Length(" + expected.Length + ")");

			for (int i = 0; i < actual.Length; i++)
			{
				if (!Object.Equals(actual[i], expected[i]))
					Assert.False(true, "Actual[" + i + "](" + actual[i] + ") != Expected[" + i + "](" + expected[i] + ")");
			}
		}
		[DebuggerHidden]
		internal static void StackEquals(ContextStack<byte[]> stack1, ContextStack<byte[]> stack2)
		{
			var hash1 = stack1.Select(o => Hashes.DoubleSHA256(o)).ToArray();
			var hash2 = stack2.Select(o => Hashes.DoubleSHA256(o)).ToArray();
			AssertEx.CollectionEquals(hash1, hash2);
		}
#if HAS_SPAN
		[DebuggerHidden]
		internal static void EqualBytes(ReadOnlySpan<byte> expected, ReadOnlySpan<byte> actual)
		{
			var aa = DataEncoders.Encoders.Hex.EncodeData(expected);
			var bb = DataEncoders.Encoders.Hex.EncodeData(actual);
			Assert.Equal(aa, bb);
		}
		[DebuggerHidden]
		internal static void EqualBytes(string expected, ReadOnlySpan<byte> actual)
		{
			var bb = DataEncoders.Encoders.Hex.EncodeData(actual);
			Assert.Equal(expected.ToLowerInvariant(), bb);
		}
		[DebuggerHidden]
		internal static void EqualBytes(ReadOnlySpan<byte> expected, string actual)
		{
			var aa = DataEncoders.Encoders.Hex.EncodeData(expected);
			Assert.Equal(aa, actual.ToLowerInvariant());
		}
#endif
{'fraction_non_alphanumeric': 0.143264988320789, 'fraction_numerical': 0.007786140669608098, 'mean_word_length': 4.505714285714285, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '6508238', 'n_tokens_mistral': 1442, 'n_tokens_neox': 1290, 'n_words': 270}