Skip to content

Commit c7f39d1

Browse files
committed
Rake test 追加
1 parent 8708ef3 commit c7f39d1

7 files changed

+35
-6
lines changed

Gemfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source :rubygems
2+
3+
group :test do
4+
gem 'rake'
5+
end

Gemfile.lock

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
GEM
2+
remote: http://rubygems.org/
3+
specs:
4+
rake (0.9.2.2)
5+
6+
PLATFORMS
7+
ruby
8+
9+
DEPENDENCIES
10+
rake

Rakefile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
require 'rake/testtask'
2+
3+
Rake::TestTask.new do |t|
4+
t.test_files = FileList["test/test_*.rb"]
5+
end

test/test_compiler.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
require 'test/typhontest'
2-
require 'lib/typhon/compiler'
1+
# encoding : utf-8
2+
$LOAD_PATH.unshift File.expand_path("./", File.dirname(__FILE__))
3+
$LOAD_PATH.unshift File.expand_path("../lib/typhon/", File.dirname(__FILE__))
4+
require 'typhontest'
5+
require 'compiler'
36

47
class TC_Compiler < Test::Unit::TestCase
58
def test_push

test/test_typhon.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# encoding : utf-8
12
$LOAD_PATH.unshift File.expand_path("../lib", File.dirname(__FILE__))
2-
require 'lib/typhon'
3-
require 'test/typhontest'
3+
$LOAD_PATH.unshift File.expand_path("./", File.dirname(__FILE__))
4+
require 'typhon'
5+
require 'typhontest'
46

57
class TC_Typhon < Test::Unit::TestCase
68
def test_push

test/test_vm.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
require 'test/typhontest'
2-
require 'lib/typhon/vm'
1+
# encoding : utf-8
2+
$LOAD_PATH.unshift File.expand_path("./", File.dirname(__FILE__))
3+
$LOAD_PATH.unshift File.expand_path("../lib/typhon/", File.dirname(__FILE__))
4+
require 'typhontest'
5+
require 'vm'
36

47
class TC_VM < Test::Unit::TestCase
58
def test_push

test/typhontest.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# encoding : utf-8
12
require 'test/unit'
23

34
module TyphonTest

0 commit comments

Comments
 (0)