Make compiler objects directly
This commit is contained in:
parent
718b6f8b0c
commit
d3ad1212fb
@ -2,10 +2,6 @@ require 'testing_env'
|
|||||||
require 'test/testball'
|
require 'test/testball'
|
||||||
|
|
||||||
class FailsWithTests < Test::Unit::TestCase
|
class FailsWithTests < Test::Unit::TestCase
|
||||||
class Double < Compiler
|
|
||||||
attr_accessor :name, :version
|
|
||||||
end
|
|
||||||
|
|
||||||
def assert_fails_with(cc)
|
def assert_fails_with(cc)
|
||||||
assert @f.new.fails_with?(cc)
|
assert @f.new.fails_with?(cc)
|
||||||
end
|
end
|
||||||
@ -18,11 +14,8 @@ class FailsWithTests < Test::Unit::TestCase
|
|||||||
@f.fails_with(*args, &block)
|
@f.fails_with(*args, &block)
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_cc(sym, build, version=nil)
|
def build_cc(name, version)
|
||||||
cc = Double.new
|
Compiler.new(name, version)
|
||||||
cc.name = sym
|
|
||||||
cc.version = version || build
|
|
||||||
cc
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user