<commit_before>package pitch

import (
	"testing"
)

var sharpNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "C#0"},
	{D, "D#0"},
	{E, "F0"},
	{F, "F#0"},
	{G, "G#0"},
	{A, "A#0"},
	{B, "C0"},
}

func TestSharpPitchNames(test *testing.T) {
	for i, t := range sharpNamesTests {
		actual := New(t.pitch, 0, Sharp).Name(SharpNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var flatNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "B0"},
	{D, "Db0"},
	{E, "Eb0"},
	{F, "E0"},
	{G, "Gb0"},
	{A, "Ab0"},
	{B, "Bb0"},
}

func TestFlatPitchNames(test *testing.T) {
	for i, t := range flatNamesTests {
		actual := New(t.pitch, 0, Flat).Name(FlatNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var doubleSharpNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "D0"},
	{D, "E0"},
	{E, "F#0"},
	{F, "G0"},
	{G, "A0"},
	{A, "B0"},
	{B, "C#0"},
}

func TestDoubleSharpPitchNames(test *testing.T) {
	for i, t := range doubleSharpNamesTests {
		actual := New(t.pitch, 0, DoubleSharp).Name(SharpNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var doubleFlatNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "Bb0"},
	{D, "C0"},
	{E, "D0"},
	{F, "Eb0"},
	{G, "F0"},
	{A, "G0"},
	{B, "A0"},
}

func TestDoubleFlatPitchNames(test *testing.T) {
	for i, t := range doubleFlatNamesTests {
		actual := New(t.pitch, 0, DoubleFlat).Name(FlatNames)
		if actual != t.expected {<commit_msg>Octaves with this initializer are relative.<commit_after>package pitch

import (
	"testing"
)

var sharpNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "C#4"},
	{D, "D#4"},
	{E, "F4"},
	{F, "F#4"},
	{G, "G#4"},
	{A, "A#4"},
	{B, "C4"},
}

func TestSharpPitchNames(test *testing.T) {
	for i, t := range sharpNamesTests {
		actual := New(t.pitch, 0, Sharp).Name(SharpNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var flatNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "B4"},
	{D, "Db4"},
	{E, "Eb4"},
	{F, "E4"},
	{G, "Gb4"},
	{A, "Ab4"},
	{B, "Bb4"},
}

func TestFlatPitchNames(test *testing.T) {
	for i, t := range flatNamesTests {
		actual := New(t.pitch, 0, Flat).Name(FlatNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var doubleSharpNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "D4"},
	{D, "E4"},
	{E, "F#4"},
	{F, "G4"},
	{G, "A4"},
	{A, "B4"},
	{B, "C#4"},
}

func TestDoubleSharpPitchNames(test *testing.T) {
	for i, t := range doubleSharpNamesTests {
		actual := New(t.pitch, 0, DoubleSharp).Name(SharpNames)
		if actual != t.expected {
			test.Errorf("index=%d actual=%s expected=%s", i, actual, t.expected)
		}
	}
}

var doubleFlatNamesTests = []struct {
	pitch    int
	expected string
}{
	{C, "Bb4"},
	{D, "C4"},
	{E, "D4"},
	{F, "Eb4"},
	{G, "F4"},
	{A, "G4"},
	{B, "A4"},
}

func TestDoubleFlatPitchNames(test *testing.T) {
	for i, t := range doubleFlatNamesTests {
		actual := New(t.pitch, 0, DoubleFlat).Name(FlatNames)
		if actual != t.expected {
{'fraction_non_alphanumeric': 0.21777642028100183, 'fraction_numerical': 0.019547953573610263, 'mean_word_length': 3.8518518518518516, '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': '2096571', 'n_tokens_mistral': 1508, 'n_tokens_neox': 1431, 'n_words': 337}