Browse Source

Tests: weaker timeouts

pull/112/head
Christoph Ruegg 13 years ago
parent
commit
be67015ab5
  1. 52
      src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Access.cs
  2. 20
      src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs

52
src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Access.cs

@ -6,7 +6,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
{
partial class MatrixStructureTheory<T>
{
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetFieldsByIndex(Matrix<T> matrix)
{
Assert.That(() => matrix[0, 0], Throws.Nothing);
@ -18,7 +18,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix[0, matrix.ColumnCount], Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetRow(Matrix<T> matrix)
{
// First Row
@ -42,7 +42,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Row(matrix.RowCount), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetRowIntoResult(Matrix<T> matrix)
{
var row = CreateVectorZero(matrix.ColumnCount);
@ -58,7 +58,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Row(matrix.RowCount, row), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetRowWithRange(Matrix<T> matrix)
{
// First Row, Columns 0..1
@ -93,7 +93,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Row(0, 0, matrix.ColumnCount + 1), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetRowWithRangeIntoResult(Matrix<T> matrix)
{
var row = CreateVectorZero(matrix.ColumnCount - 1);
@ -110,7 +110,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Row(0, 0, matrix.ColumnCount, row), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetColumn(Matrix<T> matrix)
{
// First Column
@ -134,7 +134,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Column(matrix.ColumnCount), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetColumnIntoResult(Matrix<T> matrix)
{
var col = CreateVectorZero(matrix.RowCount);
@ -150,7 +150,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Column(matrix.ColumnCount, col), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetColumnWithRange(Matrix<T> matrix)
{
// First Column, Rows 0..1
@ -185,7 +185,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Column(0, 0, matrix.RowCount + 1), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetColumnWithRangeIntoResult(Matrix<T> matrix)
{
var col = CreateVectorZero(matrix.RowCount - 1);
@ -202,7 +202,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.Column(0, 0, matrix.RowCount, col), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetRow(Matrix<T> matrix)
{
// First Row
@ -237,7 +237,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetRow(0, CreateVectorZero(matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetRowArray(Matrix<T> matrix)
{
// First Row
@ -270,7 +270,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetRow(0, new T[matrix.ColumnCount + 1]), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetColumn(Matrix<T> matrix)
{
// First Column
@ -305,7 +305,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetColumn(0, CreateVectorZero(matrix.RowCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetColumnArray(Matrix<T> matrix)
{
// First Column
@ -338,7 +338,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetColumn(0, new T[matrix.RowCount + 1]), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetUpperTriangle(Matrix<T> matrix)
{
var upper = matrix.UpperTriangle();
@ -351,7 +351,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetUpperTriangleIntoResult(Matrix<T> matrix)
{
var dense = CreateDenseZero(matrix.RowCount, matrix.ColumnCount);
@ -379,7 +379,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.UpperTriangle(CreateDenseZero(matrix.RowCount, matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetLowerTriangle(Matrix<T> matrix)
{
var upper = matrix.LowerTriangle();
@ -392,7 +392,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetLowerTriangleIntoResult(Matrix<T> matrix)
{
var dense = CreateDenseZero(matrix.RowCount, matrix.ColumnCount);
@ -420,7 +420,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.LowerTriangle(CreateDenseZero(matrix.RowCount, matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetStrictlyUpperTriangle(Matrix<T> matrix)
{
var upper = matrix.StrictlyUpperTriangle();
@ -433,7 +433,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetStrictlyUpperTriangleIntoResult(Matrix<T> matrix)
{
var dense = CreateDenseZero(matrix.RowCount, matrix.ColumnCount);
@ -461,7 +461,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.StrictlyUpperTriangle(CreateDenseZero(matrix.RowCount, matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetStrictlyLowerTriangle(Matrix<T> matrix)
{
var upper = matrix.StrictlyLowerTriangle();
@ -474,7 +474,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetStrictlyLowerTriangleIntoResult(Matrix<T> matrix)
{
var dense = CreateDenseZero(matrix.RowCount, matrix.ColumnCount);
@ -502,7 +502,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.StrictlyLowerTriangle(CreateDenseZero(matrix.RowCount, matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetDiagonal(Matrix<T> matrix)
{
var diag = matrix.Diagonal();
@ -513,7 +513,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetDiagonal(Matrix<T> matrix)
{
var m = matrix.Clone();
@ -533,7 +533,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetDiagonal(CreateVectorZero(Math.Min(matrix.RowCount, matrix.ColumnCount) + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetDiagonalArray(Matrix<T> matrix)
{
var m = matrix.Clone();
@ -552,7 +552,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SetDiagonal(new T[Math.Min(matrix.RowCount, matrix.ColumnCount) + 1]), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanGetSubmatrix(Matrix<T> matrix)
{
// Top Left Corner 2x2
@ -594,7 +594,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.SubMatrix(0, 1, 0, 0), Throws.InstanceOf<ArgumentOutOfRangeException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanSetSubmatrix(Matrix<T> matrix)
{
// Top Left Corner 2x2

20
src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs

@ -7,7 +7,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
{
partial class MatrixStructureTheory<T>
{
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanPermuteRows(Matrix<T> matrix)
{
var m = matrix.Clone();
@ -36,7 +36,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanPermuteColumns(Matrix<T> matrix)
{
var m = matrix.Clone();
@ -65,7 +65,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
}
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanInsertRow(Matrix<T> matrix)
{
var row = CreateVectorRandom(matrix.ColumnCount, 0);
@ -101,7 +101,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.InsertRow(0, CreateVectorZero(matrix.ColumnCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanInsertColumn(Matrix<T> matrix)
{
var column = CreateVectorRandom(matrix.RowCount, 0);
@ -137,7 +137,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => matrix.InsertColumn(0, CreateVectorZero(matrix.RowCount + 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanAppend(Matrix<T> left, Matrix<T> right)
{
// IF
@ -159,7 +159,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => left.Append(default(Matrix<T>)), Throws.InstanceOf<ArgumentNullException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanAppendIntoResult(Matrix<T> left, Matrix<T> right)
{
// IF
@ -186,7 +186,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => left.Append(right, CreateDenseZero(left.RowCount, left.ColumnCount + right.ColumnCount - 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanStack(Matrix<T> top, Matrix<T> bottom)
{
// IF
@ -208,7 +208,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => top.Stack(default(Matrix<T>)), Throws.InstanceOf<ArgumentNullException>());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanStackIntoResult(Matrix<T> top, Matrix<T> bottom)
{
// IF
@ -235,7 +235,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => top.Stack(bottom, CreateDenseZero(top.RowCount + bottom.RowCount, top.ColumnCount - 1)), Throws.ArgumentException);
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanDiagonalStack(Matrix<T> left, Matrix<T> right)
{
var result = left.DiagonalStack(right);
@ -261,7 +261,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests
Assert.That(() => left.DiagonalStack(default(Matrix<T>)), Throws.InstanceOf<ArgumentNullException>(), "{0}+{1}->{2}", left.GetType(), right.GetType(), result.GetType());
}
[Theory, Timeout(200)]
[Theory, Timeout(500)]
public void CanDiagonalStackIntoResult(Matrix<T> left, Matrix<T> right)
{
var result = CreateDenseZero(left.RowCount + right.RowCount, left.ColumnCount + right.ColumnCount);

Loading…
Cancel
Save