mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Add a test that formatAndClearCountryStats clears the map.
This commit is contained in:
parent
ed3bd99df6
commit
ec39237e69
1 changed files with 2 additions and 0 deletions
|
@ -1048,6 +1048,8 @@ snowflake-ips-nat-unknown 0
|
|||
atomic.AddUint64(ptr, count)
|
||||
}
|
||||
So(formatAndClearCountryStats(stats, false), ShouldEqual, "CN=250,FR=200,RU=150,TZ=100,IT=50,BE=1,CA=1,PH=1")
|
||||
// The map should be cleared on return.
|
||||
stats.Range(func(_, _ any) bool { panic("map was not cleared") })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue