Skip to content

Commit

Permalink
delete fake mirroring type
Browse files Browse the repository at this point in the history
  • Loading branch information
ichirin2501 committed Jan 8, 2024
1 parent 48b79c5 commit f1a7b6e
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions nes/ppu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,6 @@ import (

// TODO: `H` の文字のテスト

type fakeCPU struct{}

func (f *fakeCPU) SetDelayNMI() {}
func (f *fakeCPU) SetNMI(val bool) {}

type fakeMirroringType int

const (
fakeMirroringVertical fakeMirroringType = iota
fakeMirroringHorizontal
fakeMirroringFourScreen
)

func (f *fakeMirroringType) IsVertical() bool {
return *f == fakeMirroringVertical
}
func (f *fakeMirroringType) IsHorizontal() bool {
return *f == fakeMirroringHorizontal
}
func (f *fakeMirroringType) IsFourScreen() bool {
return *f == fakeMirroringFourScreen
}

func getFakeMirroringVertical() fakeMirroringType {
m := fakeMirroringVertical
return m
}
func getFakeMirroringHorizontal() fakeMirroringType {
m := fakeMirroringHorizontal
return m
}
func getFakeMirroringFourScreen() fakeMirroringType {
m := fakeMirroringFourScreen
return m
}

func Test_PPU_MirrorVRAMAddr(t *testing.T) {
t.Parallel()
tests := []struct {
Expand All @@ -55,56 +19,48 @@ func Test_PPU_MirrorVRAMAddr(t *testing.T) {
{
"1",
newVRAM(MirroringHorizontal),
// newVRAM(getFakeMirroringHorizontal()),
0x2003,
0x0003,
},
{
"2",
newVRAM(MirroringHorizontal),
//newVRAM(getFakeMirroringHorizontal()),
0x2403,
0x0003,
},
{
"3",
newVRAM(MirroringHorizontal),
//newVRAM(getFakeMirroringHorizontal()),
0x2800,
0x0400,
},
{
"4",
newVRAM(MirroringHorizontal),
//newVRAM(getFakeMirroringHorizontal()),
0x2C00,
0x0400,
},
{
"5",
newVRAM(MirroringVertical),
//newVRAM(getFakeMirroringVertical()),
0x2000,
0x0000,
},
{
"6",
newVRAM(MirroringVertical),
//newVRAM(getFakeMirroringVertical()),
0x2801,
0x0001,
},
{
"7",
newVRAM(MirroringVertical),
//newVRAM(getFakeMirroringVertical()),
0x2400,
0x0400,
},
{
"8",
newVRAM(MirroringVertical),
//newVRAM(getFakeMirroringVertical()),
0x2C01,
0x0401,
},
Expand Down

0 comments on commit f1a7b6e

Please sign in to comment.