mirror of
https://github.com/safiire/n65.git
synced 2025-08-07 21:25:20 +00:00
Enabled minitest from the rakefile
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
# Specify your gem's dependencies in n65.gemspec
|
# Specify your gem's dependencies in n65.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
|
||||||
|
Gem 'mintest'
|
||||||
|
7
Rakefile
7
Rakefile
@@ -1,2 +1,7 @@
|
|||||||
require "bundler/gem_tasks"
|
require 'bundler/gem_tasks'
|
||||||
|
require 'rake/testtask'
|
||||||
|
|
||||||
|
Rake::TestTask.new do |t|
|
||||||
|
t.pattern = 'test/test*.rb'
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@ require_relative '../lib/n65/memory_space.rb'
|
|||||||
class TestMemorySpace < MiniTest::Test
|
class TestMemorySpace < MiniTest::Test
|
||||||
include N65
|
include N65
|
||||||
|
|
||||||
def _test_create_prog_rom
|
def test_create_prog_rom
|
||||||
## First just try to read alll of it
|
## First just try to read alll of it
|
||||||
space = MemorySpace.create_prog_rom
|
space = MemorySpace.create_prog_rom
|
||||||
contents = space.read(0x8000, 0x4000)
|
contents = space.read(0x8000, 0x4000)
|
||||||
@@ -23,7 +23,7 @@ class TestMemorySpace < MiniTest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def _test_writing
|
def test_writing
|
||||||
## Write some bytes into prog 2 area
|
## Write some bytes into prog 2 area
|
||||||
space = MemorySpace.create_prog_rom
|
space = MemorySpace.create_prog_rom
|
||||||
space.write(0xC000, "hi there".bytes)
|
space.write(0xC000, "hi there".bytes)
|
||||||
@@ -38,7 +38,7 @@ class TestMemorySpace < MiniTest::Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def _test_reading_out_of_bounds
|
def test_reading_out_of_bounds
|
||||||
space = MemorySpace.create_prog_rom
|
space = MemorySpace.create_prog_rom
|
||||||
assert_raises(MemorySpace::AccessOutsideProgRom) do
|
assert_raises(MemorySpace::AccessOutsideProgRom) do
|
||||||
space.read(0x200, 10)
|
space.read(0x200, 10)
|
||||||
|
Reference in New Issue
Block a user