aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cxx/hybrid/facets/driver.cxx6
-rw-r--r--tests/cxx/hybrid/facets/test-000.std2
-rw-r--r--tests/cxx/hybrid/facets/test-000.xml1
-rw-r--r--tests/cxx/hybrid/facets/test.xsd1
4 files changed, 10 insertions, 0 deletions
diff --git a/tests/cxx/hybrid/facets/driver.cxx b/tests/cxx/hybrid/facets/driver.cxx
index 9bdfec4..bb2f258 100644
--- a/tests/cxx/hybrid/facets/driver.cxx
+++ b/tests/cxx/hybrid/facets/driver.cxx
@@ -36,6 +36,12 @@ main (int argc, char* argv[])
doc_p.parse (argv[1]);
type* r = root_p.post ();
+ // Test fractionDigit.
+ //
+ decimal d;
+ d.base_value (50.123);
+ r->decimal ().push_back (d);
+
// Serialize.
//
root_saggr root_s;
diff --git a/tests/cxx/hybrid/facets/test-000.std b/tests/cxx/hybrid/facets/test-000.std
index e777433..3f94b6c 100644
--- a/tests/cxx/hybrid/facets/test-000.std
+++ b/tests/cxx/hybrid/facets/test-000.std
@@ -47,6 +47,8 @@
<decimal>10.5</decimal>
<decimal>50</decimal>
<decimal>99.5</decimal>
+ <decimal>99.55</decimal>
+ <decimal>50.12</decimal>
<string1>12345</string1>
<string2>12345</string2>
<string2>1234567</string2>
diff --git a/tests/cxx/hybrid/facets/test-000.xml b/tests/cxx/hybrid/facets/test-000.xml
index 814be66..6430ff1 100644
--- a/tests/cxx/hybrid/facets/test-000.xml
+++ b/tests/cxx/hybrid/facets/test-000.xml
@@ -63,6 +63,7 @@
<decimal>10.5</decimal>
<decimal>50.0</decimal>
<decimal>99.5</decimal>
+ <decimal>99.55</decimal>
<string1>12345</string1>
diff --git a/tests/cxx/hybrid/facets/test.xsd b/tests/cxx/hybrid/facets/test.xsd
index 86c9776..7a45dfe 100644
--- a/tests/cxx/hybrid/facets/test.xsd
+++ b/tests/cxx/hybrid/facets/test.xsd
@@ -110,6 +110,7 @@
<restriction base="decimal">
<minInclusive value="10.0"/>
<maxInclusive value="100"/>
+ <fractionDigits value="2"/>
</restriction>
</simpleType>