summaryrefslogtreecommitdiff
path: root/tests/cxx
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2012-06-23 21:38:59 +0200
committerMarc Glisse <marc.glisse@inria.fr>2012-06-23 21:38:59 +0200
commitf96cbc1c4e0abf49724c4aef3f21b6da617316a4 (patch)
treee08e5cb014df087ec2caf267842f25977c2162b0 /tests/cxx
parent4aa6c64925423c7e3953f8e7b6d40edcef91e9c6 (diff)
downloadgmp-f96cbc1c4e0abf49724c4aef3f21b6da617316a4.tar.gz
Test numeric_limits.
Diffstat (limited to 'tests/cxx')
-rw-r--r--tests/cxx/t-misc.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/cxx/t-misc.cc b/tests/cxx/t-misc.cc
index 5efb062ee..32f73cce8 100644
--- a/tests/cxx/t-misc.cc
+++ b/tests/cxx/t-misc.cc
@@ -370,6 +370,18 @@ check_mpf (void)
}
}
+// std::numeric_limits
+void
+check_limits (void)
+{
+ // Check that the content is not private.
+ ASSERT_ALWAYS ( std::numeric_limits<mpz_class>::is_integer);
+ ASSERT_ALWAYS (!std::numeric_limits<mpf_class>::is_integer);
+
+ // Check that symbols are emitted.
+ ASSERT_ALWAYS (&std::numeric_limits<mpz_class>::is_integer
+ != &std::numeric_limits<mpq_class>::is_integer);
+}
int
main (void)
@@ -379,6 +391,7 @@ main (void)
check_mpz();
check_mpq();
check_mpf();
+ check_limits();
tests_end();
return 0;