rust-vmm / vmm-sys-util

Helpers and utilities used by multiple rust-vmm components and VMMs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

metric: add more unit tests

lauralt opened this issue · comments

For now, we are testing only the inc() method (and automatically add()) for Metric. We should add tests for count(), reset() and set() methods too.

For example, count() can be tested as follows:
assert_eq!(system_metrics.dog_metrics.bark.count(), 2); (at the end of test_main())