mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -13,7 +13,7 @@ describe "Matrix::LUPDecomposition#determinant" do
|
|||
Matrix[[7, 8], [14, 46], [28, 82]],
|
||||
].each do |m|
|
||||
lup = m.lup
|
||||
lambda {
|
||||
-> {
|
||||
lup.determinant
|
||||
}.should raise_error(Matrix::ErrDimensionMismatch)
|
||||
end
|
||||
|
|
|
@ -3,10 +3,10 @@ require 'matrix'
|
|||
|
||||
describe "Matrix::LUPDecomposition#initialize" do
|
||||
it "raises an error if argument is not a matrix" do
|
||||
lambda {
|
||||
-> {
|
||||
Matrix::LUPDecomposition.new([[]])
|
||||
}.should raise_error(TypeError)
|
||||
lambda {
|
||||
-> {
|
||||
Matrix::LUPDecomposition.new(42)
|
||||
}.should raise_error(TypeError)
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ describe "Matrix::LUPDecomposition#solve" do
|
|||
it "raises an error for singular matrices" do
|
||||
a = Matrix[[1, 2, 3], [1, 3, 5], [2, 5, 8]]
|
||||
lu = Matrix::LUPDecomposition.new(a)
|
||||
lambda {
|
||||
-> {
|
||||
lu.solve(a)
|
||||
}.should raise_error(Matrix::ErrNotRegular)
|
||||
end
|
||||
|
@ -31,7 +31,7 @@ describe "Matrix::LUPDecomposition#solve" do
|
|||
|
||||
it "raises an error when given a matrix of the wrong size" do
|
||||
values = Matrix[[1, 2, 3, 4], [0, 1, 2, 3]]
|
||||
lambda {
|
||||
-> {
|
||||
@lu.solve(values)
|
||||
}.should raise_error(Matrix::ErrDimensionMismatch)
|
||||
end
|
||||
|
@ -44,7 +44,7 @@ describe "Matrix::LUPDecomposition#solve" do
|
|||
|
||||
it "raises an error when given a vector of the wrong size" do
|
||||
values = Vector[14, 55]
|
||||
lambda {
|
||||
-> {
|
||||
@lu.solve(values)
|
||||
}.should raise_error(Matrix::ErrDimensionMismatch)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue