[goffice] Tests: even more tests for GOFormat.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Tests: even more tests for GOFormat.
- Date: Wed, 9 Apr 2014 22:58:48 +0000 (UTC)
commit a369d7fc3eab1ed6db6681e7565ad014aab23e75
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 9 18:58:18 2014 -0400
Tests: even more tests for GOFormat.
tests/test-format.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-format.c b/tests/test-format.c
index 19a913a..daa333b 100644
--- a/tests/test-format.c
+++ b/tests/test-format.c
@@ -28,6 +28,21 @@ test_general_format_1 (double val, int width, const char *expected)
static void
test_general_format (void)
{
+ test_general_format_1 (nextafter (1.999999999, 2), 12, "1.999999999");
+ test_general_format_1 (nextafter (1.999999999, 2), 11, "1.999999999");
+ test_general_format_1 (nextafter (1.999999999, 2), 10, "2");
+ test_general_format_1 (nextafter (1.999999999, 2), 9, "2");
+
+ test_general_format_1 (1.999999999, 12, "1.999999999");
+ test_general_format_1 (1.999999999, 11, "1.999999999");
+ test_general_format_1 (1.999999999, 10, "2");
+ test_general_format_1 (1.999999999, 9, "2");
+
+ test_general_format_1 (999999999, 9, "999999999");
+ test_general_format_1 (999999999, 8, "1E+09");
+ test_general_format_1 (-999999999, 10, "-999999999");
+ test_general_format_1 (-999999999, 9, "-1E+09");
+
test_general_format_1 (0, 5, "0");
test_general_format_1 (0, 3, "0");
test_general_format_1 (0, 2, "0");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]