Skip to content

Commit

Permalink
Merge 19dc5b5 into a809daf
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Sep 12, 2018
2 parents a809daf + 19dc5b5 commit e814827
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mat/format_test.go
Expand Up @@ -26,7 +26,7 @@ func TestFormat(t *testing.T) {
[]rp{
{"%v", "⎡0 0 0⎤\n⎢0 0 0⎥\n⎣0 0 0⎦"},
{"% f", "⎡. . .⎤\n⎢. . .⎥\n⎣. . .⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:3, Cols:3, Data:[]float64{0, 0, 0, 0, 0, 0, 0, 0, 0}, Stride:3}, capRows:3, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(3, 3, nil))},
{"%s", "%!s(*mat.Dense=Dims(3, 3))"},
},
},
Expand All @@ -35,7 +35,7 @@ func TestFormat(t *testing.T) {
[]rp{
{"%v", "⎡1 1 1⎤\n⎢1 1 1⎥\n⎣1 1 1⎦"},
{"% f", "⎡1 1 1⎤\n⎢1 1 1⎥\n⎣1 1 1⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:3, Cols:3, Data:[]float64{1, 1, 1, 1, 1, 1, 1, 1, 1}, Stride:3}, capRows:3, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(3, 3, []float64{1, 1, 1, 1, 1, 1, 1, 1, 1}))},
},
},
{
Expand All @@ -51,23 +51,23 @@ func TestFormat(t *testing.T) {
[]rp{
{"%v", "⎡1 0 0⎤\n⎢0 1 0⎥\n⎣0 0 1⎦"},
{"% f", "⎡1 . .⎤\n⎢. 1 .⎥\n⎣. . 1⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:3, Cols:3, Data:[]float64{1, 0, 0, 0, 1, 0, 0, 0, 1}, Stride:3}, capRows:3, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(3, 3, []float64{1, 0, 0, 0, 1, 0, 0, 0, 1}))},
},
},
{
Formatted(NewDense(2, 3, []float64{1, 2, 3, 4, 5, 6})),
[]rp{
{"%v", "⎡1 2 3⎤\n⎣4 5 6⎦"},
{"% f", "⎡1 2 3⎤\n⎣4 5 6⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:2, Cols:3, Data:[]float64{1, 2, 3, 4, 5, 6}, Stride:3}, capRows:2, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(2, 3, []float64{1, 2, 3, 4, 5, 6}))},
},
},
{
Formatted(NewDense(3, 2, []float64{1, 2, 3, 4, 5, 6})),
[]rp{
{"%v", "⎡1 2⎤\n⎢3 4⎥\n⎣5 6⎦"},
{"% f", "⎡1 2⎤\n⎢3 4⎥\n⎣5 6⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:3, Cols:2, Data:[]float64{1, 2, 3, 4, 5, 6}, Stride:2}, capRows:3, capCols:2}"},
{"%#v", fmt.Sprintf("%#v", NewDense(3, 2, []float64{1, 2, 3, 4, 5, 6}))},
},
},
{
Expand All @@ -80,7 +80,7 @@ func TestFormat(t *testing.T) {
{"%v", "⎡ 0 1 1.4142135623730951⎤\n⎣1.7320508075688772 2 2.23606797749979⎦"},
{"%.2f", "⎡0.00 1.00 1.41⎤\n⎣1.73 2.00 2.24⎦"},
{"% f", "⎡ . 1 1.4142135623730951⎤\n⎣1.7320508075688772 2 2.23606797749979⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:2, Cols:3, Data:[]float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}, Stride:3}, capRows:2, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(2, 3, []float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}))},
},
},
{
Expand All @@ -93,7 +93,7 @@ func TestFormat(t *testing.T) {
{"%v", "⎡ 0 1⎤\n⎢1.4142135623730951 1.7320508075688772⎥\n⎣ 2 2.23606797749979⎦"},
{"%.2f", "⎡0.00 1.00⎤\n⎢1.41 1.73⎥\n⎣2.00 2.24⎦"},
{"% f", "⎡ . 1⎤\n⎢1.4142135623730951 1.7320508075688772⎥\n⎣ 2 2.23606797749979⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:3, Cols:2, Data:[]float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}, Stride:2}, capRows:3, capCols:2}"},
{"%#v", fmt.Sprintf("%#v", NewDense(3, 2, []float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}))},
},
},
{
Expand All @@ -106,7 +106,7 @@ func TestFormat(t *testing.T) {
{"%v", "⎡ 0 1 1.4142135623730951⎤\n⎣1.7320508075688772 2 2.23606797749979⎦"},
{"%.2f", "⎡0.00 1.00 1.41⎤\n⎣1.73 2.00 2.24⎦"},
{"% f", "⎡ . 1 1.4142135623730951⎤\n⎣1.7320508075688772 2 2.23606797749979⎦"},
{"%#v", "&mat.Dense{mat:blas64.General{Rows:2, Cols:3, Data:[]float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}, Stride:3}, capRows:2, capCols:3}"},
{"%#v", fmt.Sprintf("%#v", NewDense(2, 3, []float64{0, 1, 1.4142135623730951, 1.7320508075688772, 2, 2.23606797749979}))},
},
},
{
Expand Down

0 comments on commit e814827

Please sign in to comment.