sqids / sqids-go

Official Go port of Sqids. Generate short unique IDs from numbers.
https://sqids.org/go
MIT License
492 stars 8 forks source link

test: Allow the use of the `-short` flag (`1K` iterations instead of `1M`) #8

Closed peterhellberg closed 10 months ago

peterhellberg commented 11 months ago

In order to significantly reduce the runtime of the test suite the -short flag can now be used (when running the whole set of uniques test cases are not desired)

$ time go test -short ./...
ok      github.com/sqids/sqids-go   0.446s

real    0m0.559s
user    0m0.688s
sys 0m0.113s

Also combine the tests into subtests under TestUniques