Use static_assert instead of runtime assert in std::money_base tests.

llvm-svn: 273360
This commit is contained in:
Eric Fiselier 2016-06-22 01:40:46 +00:00
parent bae51d36aa
commit 77d2d95973
1 changed files with 7 additions and 7 deletions

View File

@ -21,13 +21,13 @@
int main() int main()
{ {
std::money_base mb; std::money_base mb; ((void)mb);
assert(mb.none == 0); static_assert(std::money_base::none == 0, "");
assert(mb.space == 1); static_assert(std::money_base::space == 1, "");
assert(mb.symbol == 2); static_assert(std::money_base::symbol == 2, "");
assert(mb.sign == 3); static_assert(std::money_base::sign == 3, "");
assert(mb.value == 4); static_assert(std::money_base::value == 4, "");
assert(sizeof(std::money_base::pattern) == 4); static_assert(sizeof(std::money_base::pattern) == 4, "");
std::money_base::pattern p; std::money_base::pattern p;
p.field[0] = std::money_base::none; p.field[0] = std::money_base::none;
} }