<commit_before>package types

import (
	"testing"
)

func TestChunkSizeConsts(t *testing.T) {
	type Test struct {
		desc     string
		input    int
		expected int
	}

	tests := []Test{
		{"ChunkSizeH", ChunkSizeH, 16},
		{"ChunkSizeY", ChunkSizeY, 128},
	}

	for _, r := range tests {
		if r.expected != r.input {
			t.Errorf("Expected %s == %d but it was %d", r.desc, r.expected, r.input)
		}
	}
}

func TestLookDegrees_ToLookBytes(t *testing.T) {
	type Test struct {
		input    LookDegrees
		expected LookBytes
	}

	var tests = []Test{
		{LookDegrees{0, 0}, LookBytes{0, 0}},
		{LookDegrees{0, 90}, LookBytes{0, 64}},
		{LookDegrees{0, 180}, LookBytes{0, 128}},
		{LookDegrees{0, -90}, LookBytes{0, 192}},
		{LookDegrees{0, 270}, LookBytes{0, 192}},
		{LookDegrees{90, 0}, LookBytes{64, 0}},
		{LookDegrees{180, 0}, LookBytes{128, 0}},
		{LookDegrees{-90, 0}, LookBytes{192, 0}},
		{LookDegrees{270, 0}, LookBytes{192, 0}},
	}

	for _, r := range tests {
		result := r.input.ToLookBytes()
		if r.expected.Yaw != result.Yaw || r.expected.Pitch != result.Pitch {
			t.Errorf("LookDegrees%v expected LookBytes%v got LookBytes%v",
				r.input, r.expected, result)
		}
	}
}

func TestChunkSideDir_GetOpposite(t *testing.T) {
	type Test struct {
		input, expected ChunkSideDir
	}

	tests := []Test{
		{ChunkSideEast, ChunkSideWest},
		{ChunkSideSouth, ChunkSideNorth},
		{ChunkSideWest, ChunkSideEast},
		{ChunkSideNorth, ChunkSideSouth},
	}

	for i := range tests {
		input, expected := tests[i].input, tests[i].expected
		result := input.GetOpposite()
		if expected != result {
			t.Errorf(
				"%T(%v).GetOpposite()=>%d but expected %d",
				input, input, result, expected)
		}
	}
}

func TestAbsXyz_ToChunkXz(t *testing.T) {
	type Test struct {
		input    AbsXyz
		expected ChunkXz
	}
	var tests = []Test{
		{AbsXyz{0, 0, 0}, ChunkXz{0, 0}},
		{AbsXyz{0, 0, 16}, ChunkXz{0, 1}},
		{AbsXyz{16, 0, 0}, ChunkXz{1, 0}},
		{AbsXyz{0, 0, -16}, ChunkXz{0, -1}},
		{AbsXyz{-16, 0, 0}, ChunkXz{-1, 0}},
		{AbsXyz{-1, 0, -1}, ChunkXz{-1, -1}},
	}

	for _, test := range tests {
		input, expected := test.input, test.expected
		result := input.ToChunkXz()<commit_msg>Removing test for code that has been removed.<commit_after>package types

import (
	"testing"
)

func TestChunkSizeConsts(t *testing.T) {
	type Test struct {
		desc     string
		input    int
		expected int
	}

	tests := []Test{
		{"ChunkSizeH", ChunkSizeH, 16},
		{"ChunkSizeY", ChunkSizeY, 128},
	}

	for _, r := range tests {
		if r.expected != r.input {
			t.Errorf("Expected %s == %d but it was %d", r.desc, r.expected, r.input)
		}
	}
}

func TestLookDegrees_ToLookBytes(t *testing.T) {
	type Test struct {
		input    LookDegrees
		expected LookBytes
	}

	var tests = []Test{
		{LookDegrees{0, 0}, LookBytes{0, 0}},
		{LookDegrees{0, 90}, LookBytes{0, 64}},
		{LookDegrees{0, 180}, LookBytes{0, 128}},
		{LookDegrees{0, -90}, LookBytes{0, 192}},
		{LookDegrees{0, 270}, LookBytes{0, 192}},
		{LookDegrees{90, 0}, LookBytes{64, 0}},
		{LookDegrees{180, 0}, LookBytes{128, 0}},
		{LookDegrees{-90, 0}, LookBytes{192, 0}},
		{LookDegrees{270, 0}, LookBytes{192, 0}},
	}

	for _, r := range tests {
		result := r.input.ToLookBytes()
		if r.expected.Yaw != result.Yaw || r.expected.Pitch != result.Pitch {
			t.Errorf("LookDegrees%v expected LookBytes%v got LookBytes%v",
				r.input, r.expected, result)
		}
	}
}

func TestAbsXyz_ToChunkXz(t *testing.T) {
	type Test struct {
		input    AbsXyz
		expected ChunkXz
	}
	var tests = []Test{
		{AbsXyz{0, 0, 0}, ChunkXz{0, 0}},
		{AbsXyz{0, 0, 16}, ChunkXz{0, 1}},
		{AbsXyz{16, 0, 0}, ChunkXz{1, 0}},
		{AbsXyz{0, 0, -16}, ChunkXz{0, -1}},
		{AbsXyz{-16, 0, 0}, ChunkXz{-1, 0}},
		{AbsXyz{-1, 0, -1}, ChunkXz{-1, -1}},
	}

	for _, test := range tests {
		input, expected := test.input, test.expected
		result := input.ToChunkXz()
{'fraction_non_alphanumeric': 0.1793265465935787, 'fraction_numerical': 0.05272774732445837, 'mean_word_length': 3.7661691542288556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1440202', 'n_tokens_mistral': 1842, 'n_tokens_neox': 1555, 'n_words': 371}