diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-21 11:04:57 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-21 11:04:57 +0200 |
| commit | fc1743af87bb0c91ec1e3bea2f59c3201abcbd22 (patch) | |
| tree | 08782a2ae006ef17d7f0d25ac5b4f9dfbb362ecd /ride/index_test.go | |
| parent | d26aa2dca1b14b7d52070825bfc73c5e8aed7a16 (diff) | |
refactor(ride,mountain_pass): remove dead code identified by deadcode analyzer
Diffstat (limited to 'ride/index_test.go')
| -rw-r--r-- | ride/index_test.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/ride/index_test.go b/ride/index_test.go deleted file mode 100644 index 7b3dc34..0000000 --- a/ride/index_test.go +++ /dev/null @@ -1,32 +0,0 @@ -package ride_test - -import ( - "fmt" - "testing" - - "github.com/bradleyjkemp/cupaloy" - "github.com/martinlehoux/biking_home/ride" - "github.com/stretchr/testify/assert" -) - -func TestRideClimbLaCride(t *testing.T) { - ride19Jan, err := ride.ParseFile(parser, "../examples/activity_18043356988.gpx") - assert.NoError(t, err) - ride30Mar, err := ride.ParseFile(parser, "../examples/activity_18679866717.gpx") - assert.NoError(t, err) - ride20Apr, err := ride.ParseFile(parser, "../examples/activity_18880605641.gpx") - assert.NoError(t, err) - index := ride.NewFlatRideClimbsIndex(30) - index.Insert(ride19Jan) - index.Insert(ride30Mar) - logs := []string{} - for _, climb := range ride20Apr.AllClimbs() { - logs = append(logs, fmt.Sprintf("Climb %s (%s, %.1fkm/h)", climb, climb.Duration(), climb.Speed()*3.6)) - if len(index.Similar(ride20Apr, climb)) > 0 { - for _, similar := range index.Similar(ride20Apr, climb) { - logs = append(logs, fmt.Sprintf(" %s (%s, %.1fkm/h)", similar, similar.Duration(), similar.Speed()*3.6)) - } - } - } - cupaloy.SnapshotT(t, logs) -} |
