Skip to content

Commit 755d400

Browse files
authored
Merge branch 'master' into mapcrafter2048/added-time-space-complexity-info
2 parents 51915ff + ff32def commit 755d400

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Keep GitHub Actions up to date with GitHub's Dependabot...
2+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
3+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
4+
version: 2
5+
updates:
6+
- package-ecosystem: github-actions
7+
directory: /
8+
groups:
9+
github-actions:
10+
patterns:
11+
- "*" # Group all Actions updates into a single larger pull request
12+
schedule:
13+
interval: weekly

dynamic/subsetsum_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package dynamic
22

3-
import (
4-
"fmt"
5-
"testing"
6-
)
3+
import "testing"
74

85
func TestSubsetSum(t *testing.T) {
96

@@ -74,7 +71,7 @@ func TestSubsetSum(t *testing.T) {
7471

7572
for i := range subsetSumTestData {
7673

77-
t.Run(fmt.Sprintf(subsetSumTestData[i].description), func(t *testing.T) {
74+
t.Run(subsetSumTestData[i].description, func(t *testing.T) {
7875
array := subsetSumTestData[i].array
7976
sum := subsetSumTestData[i].sum
8077

math/matrix/matrix_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestNewFromElements(t *testing.T) {
3232
for j := 0; j < len(validElements[0]); j++ {
3333
err := expectedm1.Set(i, j, validElements[i][j])
3434
if err != nil {
35-
t.Errorf("copyMatrix.Set error: " + err.Error())
35+
t.Errorf("copyMatrix.Set error: %s", err.Error())
3636
}
3737
}
3838
}
@@ -73,7 +73,7 @@ func TestMatrixGet(t *testing.T) {
7373
matrix := matrix.New(3, 3, 0)
7474
err := matrix.Set(1, 1, 42) // Set a specific value for testing
7575
if err != nil {
76-
t.Errorf("copyMatrix.Set error: " + err.Error())
76+
t.Errorf("copyMatrix.Set error: %s", err.Error())
7777
}
7878
// Test case 1: Valid Get
7979
val1, err1 := matrix.Get(1, 1)

math/matrix/strassenmatrixmultiply_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func TestStrassenMatrixMultiply(t *testing.T) {
6666
}
6767
}
6868
func TestMatrixMultiplication(t *testing.T) {
69-
rand.Seed(time.Now().UnixNano())
69+
rand.New(rand.NewSource(time.Now().UnixNano()))
7070

7171
// Generate random matrices for testing
7272
size := 1 << (rand.Intn(8) + 1) // tests for matrix with n as power of 2
@@ -103,7 +103,7 @@ func TestMatrixMultiplication(t *testing.T) {
103103
}
104104

105105
func MakeRandomMatrix[T constraints.Integer](rows, columns int) matrix.Matrix[T] {
106-
rand.Seed(time.Now().UnixNano())
106+
rand.New(rand.NewSource(time.Now().UnixNano()))
107107

108108
matrixData := make([][]T, rows)
109109
for i := 0; i < rows; i++ {

0 commit comments

Comments
 (0)