root: test: Random: assert multiple types

- Add test cases for multiple types
- Rewrite to include new interface/impl
- Fix assertion test to not exceed error boundary
This commit is contained in:
2024-07-23 18:04:19 -07:00
parent 879eb6f785
commit 480b42e273
2 changed files with 60 additions and 18 deletions

View File

@@ -53,7 +53,8 @@ struct RandomInterface
t_random generate_impl()
{
static_assert(
std::is_same_v<t_random, uint32_t>, "Random interface has changed");
::docker_finance::internal::type::is_real_integral<t_random>::value,
"Random interface has changed");
return t_random{std::numeric_limits<t_random>::max()};
}