From d26d1e07c1f58d351a4bcd0c8b6d3dc36a5f8804 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 17 Apr 2001 00:47:46 +0000 Subject: [PATCH] ICU-597 Don't try to convert a large double to int32_t (again). X-SVN-Rev: 4481 --- icu4c/source/test/intltest/tsnmfmt.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/icu4c/source/test/intltest/tsnmfmt.cpp b/icu4c/source/test/intltest/tsnmfmt.cpp index 5aef4e60070..b180b6901c5 100644 --- a/icu4c/source/test/intltest/tsnmfmt.cpp +++ b/icu4c/source/test/intltest/tsnmfmt.cpp @@ -197,7 +197,10 @@ IntlTestNumberFormat::testFormat(/* char* par */) // try again with very large numbers it = randDouble() * 10000000000.0; tryIt(it); - it = randDouble() * INT32_MAX; + + // try again with very large numbers + // and without going outside of the int32_t range + it = randFraction() * INT32_MAX; tryIt(it); tryIt((int32_t)uprv_floor(it));