diff options
| author | Will Hawkins <[email protected]> | 2022-11-05 20:37:48 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2022-11-05 20:39:40 -0400 |
| commit | 4508e87a57c54675ac9d94818ea5e0f4c0f7d4e6 (patch) | |
| tree | a884bbdb461f12406ace8b8b8a79ae8b9c00c206 /utilities/utilities_test.go | |
| parent | 1f36afaf4e2c79aa4bc80f9bc8320ea28cc51f6f (diff) | |
[Refactor] Rename/update MovingAverage to MathematicalSeries
We want the MovingAverage functionality to be more generic and useful
than just doing a moving average calculation. The new functionality
allows for the calculation of the standard deviation and supports a
generic type (so it can be used with integers and floats).
Diffstat (limited to 'utilities/utilities_test.go')
| -rw-r--r-- | utilities/utilities_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utilities/utilities_test.go b/utilities/utilities_test.go index 107c2d2..3a84d76 100644 --- a/utilities/utilities_test.go +++ b/utilities/utilities_test.go @@ -14,11 +14,24 @@ package utilities import ( + "log" "sync" "testing" "time" ) +func TestIota(t *testing.T) { + r := Iota(6, 15) + + l := 6 + for _, vr := range r { + if vr != l { + log.Fatalf("Iota failed: expected %d, got %d\n", l, vr) + } + l++ + } +} + func TestReadAfterCloseOnBufferedChannel(t *testing.T) { communication := make(chan int, 100) |
