remove Builder.features and Builder.produces?
This commit is contained in:
1 parent
ac1fc6d106
commit
3ff09978f4
11 files changed
+69
-199
No files matched your search
@@ -1410,6 +1410,14 @@ EOF
|
||||
expect(result.stderr).to eq ""
|
||||
expect(lines(result.stdout)).to include "ar rcf lib.a build/e.1/one.o build/e.1/three.o build/e.1/two.o"
|
||||
end
|
||||
|
||||
it "allows passing object files as sources" do
|
||||
test_dir("library")
|
||||
result = run_rscons(rsconscript: "library_from_object.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(File.exists?("two.o")).to be_truthy
|
||||
expect(lines(result.stdout)).to include "Building static library archive => lib.a"
|
||||
end
|
||||
end
|
||||
|
||||
context "SharedLibrary builder" do
|
||||
@@ -1425,6 +1433,13 @@ EOF
|
||||
expect(slines).to include("Linking => libmine.so")
|
||||
end
|
||||
end
|
||||
|
||||
it "allows passing object files as sources" do
|
||||
test_dir "shared_library"
|
||||
result = run_rscons(rsconscript: "shared_library_from_object.rb")
|
||||
expect(result.stderr).to eq ""
|
||||
expect(File.exists?("one.o"))
|
||||
end
|
||||
end
|
||||
|
||||
context "multi-threading" do
|
||||
|
||||
@@ -233,27 +233,5 @@ module Rscons
|
||||
expect {env.__send__(:find_finished_thread, false)}.to raise_error /No threads to wait for/
|
||||
end
|
||||
end
|
||||
|
||||
describe "#features_met?" do
|
||||
it "returns true when the builder provides all requested features" do
|
||||
builder = Struct.new(:features).new(%w[shared other])
|
||||
expect(subject.__send__(:features_met?, builder, %w[shared])).to be_truthy
|
||||
end
|
||||
|
||||
it "returns true when no features are requested" do
|
||||
builder = Struct.new(:features).new([])
|
||||
expect(subject.__send__(:features_met?, builder, [])).to be_truthy
|
||||
end
|
||||
|
||||
it "returns false when a builder does not provide a requested feature" do
|
||||
builder = Struct.new(:features).new(%w[shared other])
|
||||
expect(subject.__send__(:features_met?, builder, %w[other2])).to be_falsey
|
||||
end
|
||||
|
||||
it "returns false when a builder provides a feature that is not desired" do
|
||||
builder = Struct.new(:features).new(%w[shared other])
|
||||
expect(subject.__send__(:features_met?, builder, %w[-shared])).to be_falsey
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user