<commit_before>package iso8583

import (
	"bytes"
	"encoding/hex"
	"testing"
)

func Test_Bitmap(t *testing.T) {

	bmp := NewBitMap()

	bmp.SetOn(1)
	bmp.SetOn(64)
	bmp.SetOn(52)
	bmp.SetOn(40)
	bmp.SetOn(128)

	//bmp.SetBit(bmp, 0, 0)
	//bmp.SetBit(bmp, 4, 1)

	//t.Log(bmp.Uint64())

	t.Log(hex.EncodeToString(bmp.Bytes()))
}

// 1101 B
func Test_Iso8583Message(t *testing.T) {

	data, _ := hex.DecodeString("31313030F0040000E000000000000000000000013135333731313131313131313131313134F0F0F4F0F0F0303030303030303030313232313231320010e1e2e3a1a2a3a4d1d2d3a2a3a4d1d2d30010f1f2f3a1a2a3a4d1a2a3F0F2F8F3F7F1F1F1F1F1F1F1F1F1F1F1F1F47EF1F2F1F2F5F6F5F6F5F5F5F4e201f245ed4abb00")

	buf := bytes.NewBuffer(data)
	t.Log(hex.EncodeToString(buf.Bytes()))
	_, err := Handle("", buf)
	if err != nil {
		t.Fail()
	}

}<commit_msg>gofmt<commit_after>package iso8583

import (
	"bytes"
	"encoding/hex"
	"github.com/rkbalgi/go/iso_host"
	"testing"
)

func Test_Bitmap(t *testing.T) {

	bmp := NewBitMap()

	bmp.SetOn(1)
	bmp.SetOn(64)
	bmp.SetOn(52)
	bmp.SetOn(40)
	bmp.SetOn(128)

	//bmp.SetBit(bmp, 0, 0)
	//bmp.SetBit(bmp, 4, 1)

	//t.Log(bmp.Uint64())

	t.Log(hex.EncodeToString(bmp.Bytes()))
}

// 1101 B
func Test_Iso8583Message(t *testing.T) {

	data, _ := hex.DecodeString("31313030F0040000E000000000000000000000013135333731313131313131313131313134F0F0F4F0F0F0303030303030303030313232313231320010e1e2e3a1a2a3a4d1d2d3a2a3a4d1d2d30010f1f2f3a1a2a3a4d1a2a3F0F2F8F3F7F1F1F1F1F1F1F1F1F1F1F1F1F47EF1F2F1F2F5F6F5F6F5F5F5F4e201f245ed4abb00")

	buf := bytes.NewBuffer(data)
	t.Log(hex.EncodeToString(buf.Bytes()))
	_, err := iso_host.Handle("", buf)
	if err != nil {
		t.Fail()
	}

}
{'fraction_non_alphanumeric': 0.1402769416014449, 'fraction_numerical': 0.25526791089705, 'mean_word_length': 5.867768595041323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6233119', 'n_tokens_mistral': 1104, 'n_tokens_neox': 890, 'n_words': 83}