mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-03-14 05:46:26 -05:00
21 lines
286 B
Go
21 lines
286 B
Go
package cpu
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestStat(t *testing.T) {
|
|
time.Sleep(time.Second * 2)
|
|
var s Stat
|
|
var i Info
|
|
ReadStat(&s)
|
|
i = GetInfo()
|
|
|
|
assert.NotZero(t, s.Usage)
|
|
assert.NotZero(t, i.Frequency)
|
|
assert.NotZero(t, i.Quota)
|
|
}
|