zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #19758
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
Paul J. Lucas has proposed merging lp:~zorba-coders/zorba/bug-1123163 into lp:zorba.
Commit message:
Rewrote format-integer() code -- fixed all bugs. Note that tests 049, 050, and 052 should not be run because we're electing not to implement the functionality.
Requested reviews:
Paul J. Lucas (paul-lucas)
Related bugs:
Bug #1123163 in Zorba: "fn:format-integer failures (at least 19)"
https://bugs.launchpad.net/zorba/+bug/1123163
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123163/+merge/156322
Rewrote format-integer() code -- fixed all bugs. Note that tests 049, 050, and 052 should not be run because we're electing not to implement the functionality.
--
https://code.launchpad.net/~zorba-coders/zorba/bug-1123163/+merge/156322
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog 2013-03-24 20:40:03 +0000
+++ ChangeLog 2013-04-01 02:46:27 +0000
@@ -39,6 +39,7 @@
* Fixed bug #1124273 (xqdoc crash because of annotation literals)
* Fixed bug #867027 (XQST0059 error messages inconsistent)
* Fixed bug #1095889 (Improve error message for xml-parsing error).
+ * Fixed bug #1123163 (fn:format-integer failures)
* Fixed bug in index join rule (no index join if inner clause has positional var).
* Fixed bug in index join rule (copy var ids after cloning index domain expr).
* Fixed bug #1123162 (FOTS: formatting dates and times failures)
@@ -57,12 +58,10 @@
* Fixed bug #866874 (regex "range subtraction" not supported for ICU)
* Fixed bug in computing the static type of an allowing-empty FOR variable.
* Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)
-<<<<<<< TREE
* Fixed bug #1099535 (xml:parse endless loop)
* Fixed bug in optimizing fn:count over general-index probes
* Fixed bug #866958 (Parsing error not explicit enough)
* Fixed bug #867068: (Incorrect usage of XQDY0027)
-=======
* Fixed bug #1099535 (xml:parse endless loop)
* Fixed bug: jsoniq constructor should not be const-folded
* Fixed bug #866958 (Parsing error not explicit enough)
@@ -71,7 +70,6 @@
* Fixed bug #1125444 (input group-by exprs were not treated by index-flwor_vars()
functoin, leading to erroneous loop hoisting).
* Fixed bug #867068 (Incorrect usage of XQDY0027)
->>>>>>> MERGE-SOURCE
* Fixed bug #1023362 (xsi:type attribute ignored during validation)
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2013-03-22 17:19:01 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2013-04-01 02:46:27 +0000
@@ -262,10 +262,6 @@
extern ZORBA_DLL_PUBLIC XQueryErrorCode FODT0003;
-extern ZORBA_DLL_PUBLIC XQueryErrorCode FOFI0001;
-
-extern ZORBA_DLL_PUBLIC XQueryErrorCode FOFI0002;
-
extern ZORBA_DLL_PUBLIC XQueryErrorCode FONS0004;
extern ZORBA_DLL_PUBLIC XQueryErrorCode FONS0005;
=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq 2013-03-21 19:33:22 +0000
+++ modules/w3c/pregenerated/xqt-errors.xq 2013-04-01 02:46:27 +0000
@@ -1113,7 +1113,7 @@
(:~
:
- : Invalid \c fn:format-number() picture string.
+ : Invalid decimal/integer format picture string.
:
: @see http://www.w3.org/2005/xqt-errors
:)
@@ -1145,22 +1145,6 @@
(:~
:
- : format-integer: Cannot cast $language to \c xs:language.
- :
- : @see http://www.w3.org/2005/xqt-errors
-:)
-declare variable $err:FOFI0001 as xs:QName := fn:QName($err:NS, "err:FOFI0001");
-
-(:~
- :
- : format-integer: invalid parameter.
- :
- : @see http://www.w3.org/2005/xqt-errors
-:)
-declare variable $err:FOFI0002 as xs:QName := fn:QName($err:NS, "err:FOFI0002");
-
-(:~
- :
: No namespace found for prefix.
:
: @see http://www.w3.org/2005/xqt-errors
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2013-03-24 19:05:42 +0000
+++ src/diagnostics/diagnostic_en.xml 2013-04-01 02:46:27 +0000
@@ -1028,12 +1028,21 @@
<entry key="BadComponent_3">
<value>'$3': invalid component specifier</value>
</entry>
+ <entry key="Bad2ndModifier_3">
+ <value>'$3': invalid second presentation modifier</value>
+ </entry>
+ <entry key="Bad2ndModifierHere_3">
+ <value>'$3': valid second presentation modifier invalid here</value>
+ </entry>
<entry key="BadWidthModifier">
<value>invalid width modifier</value>
</entry>
<entry key="DigitNotSameFamily_34">
<value>"$3": digit not from same digit family as $4</value>
</entry>
+ <entry key="Dup2ndModifier_3">
+ <value>"$3": duplicate second presentation modifier</value>
+ </entry>
<entry key="MultipleComponent_3">
<value>'$3': multiple component specifiers between []</value>
</entry>
@@ -1300,9 +1309,39 @@
<diagnostic code="FODF1310">
<comment>
- Invalid \c fn:format-number() picture string.
+ Invalid decimal/integer format picture string.
</comment>
- <value>"$1": invalid fn:format-number() picture string$2</value>
+ <value>"$1": invalid picture string for decimal/integer${: 2}</value>
+ <entry key="BadCharacter_3">
+ <value>'$3': invalid character</value>
+ </entry>
+ <entry key="BadFormatModifier_3">
+ <value>'$3': invalid format modifier</value>
+ </entry>
+ <entry key="BadFormatModifierHere_3">
+ <value>'$3': valid format modifier invalid here</value>
+ </entry>
+ <entry key="DigitNotSameFamily_34">
+ <value>"$3": digit not from same digit family as $4</value>
+ </entry>
+ <entry key="DupFormatModifier_3">
+ <value>"$3": duplicate format modifier</value>
+ </entry>
+ <entry key="EmptyFormat">
+ <value>empty primary format</value>
+ </entry>
+ <entry key="NoAdjacentGroupSep_3">
+ <value>"$3": grouping separator must not be adjacent to others</value>
+ </entry>
+ <entry key="NoGroupSepAtStart_3">
+ <value>"$3": grouping separator illegal at start of decimal-digit-pattern</value>
+ </entry>
+ <entry key="NoGroupSepAtEnd_3">
+ <value>"$3": grouping separator illegal at end of decimal-digit-pattern</value>
+ </entry>
+ <entry key="NoOptDigitAfterMandatory">
+ <value>"#": optional-digit-sign must precede all mandatory-digit-signs</value>
+ </entry>
</diagnostic>
<diagnostic code="FODT0001">
@@ -1326,20 +1365,6 @@
<value>"$1": invalid timezone value (in seconds)</value>
</diagnostic>
- <diagnostic code="FOFI0001">
- <comment>
- format-integer: Cannot cast $language to \c xs:language.
- </comment>
- <value>"$1": not castable to xs:language</value>
- </diagnostic>
-
- <diagnostic code="FOFI0002">
- <comment>
- format-integer: invalid parameter.
- </comment>
- <value>invalid argument in format-integer: $1</value>
- </diagnostic>
-
<diagnostic code="FONS0004">
<comment>
No namespace found for prefix.
@@ -4215,38 +4240,6 @@
<value>error</value>
</entry>
- <entry key="format_integer_bad_picture_format">
- <value>bad $picture format: $2</value>
- </entry>
-
- <entry key="format_integer_duplicated_optional_format_modifier">
- <value>duplicated optional format modifier '$2'</value>
- </entry>
-
- <entry key="format_integer_optional_format_modifier_not_closed">
- <value>bad optional format modifier ($2), cannot find closing ')' </value>
- </entry>
-
- <entry key="format_integer_picture_empty">
- <value>$picture parameter should not be empty</value>
- </entry>
-
- <entry key="format_integer_unknown_optional_format_modifier_character">
- <value>unknown optional format modifier character '$2'</value>
- </entry>
-
- <entry key="format_integer_value_1_10">
- <value>$value ($2) should be between 1 and 10 for this formatting picture</value>
- </entry>
-
- <entry key="format_integer_value_1_20">
- <value>$value ($2) should be between 1 and 20 for this formatting picture</value>
- </entry>
-
- <entry key="format_integer_value_gt_3000">
- <value>$value ($2) should be less than 3000 for Roman representation</value>
- </entry>
-
<entry key="full-text dynamic error">
<value>full-text dynamic error</value>
</entry>
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2013-03-22 17:19:01 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2013-04-01 02:46:27 +0000
@@ -375,12 +375,6 @@
XQueryErrorCode FODT0003( "FODT0003" );
-XQueryErrorCode FOFI0001( "FOFI0001" );
-
-
-XQueryErrorCode FOFI0002( "FOFI0002" );
-
-
XQueryErrorCode FONS0004( "FONS0004" );
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2013-03-24 19:05:42 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 02:46:27 +0000
@@ -48,15 +48,13 @@
{ "FODC0006", "invalid content passed to $1: $2" },
{ "FODC0007", "\"$1\": base URI passed to fn:parse() is not a valid absolute URI" },
{ "FODF1280", "\"$1\": invalid decimal format name for fn:format-number()" },
- { "FODF1310", "\"$1\": invalid fn:format-number() picture string$2" },
+ { "FODF1310", "\"$1\": invalid picture string for decimal/integer${: 2}" },
{ "FODT0001", "overflow/underflow in date/time operation" },
{ "FODT0002", "overflow/underflow in duration operation" },
{ "FODT0003", "\"$1\": invalid timezone value (in seconds)" },
{ "FOER0000", "unidentifier error" },
{ "FOFD1340", "\"$1\": invalid picture string for date/time${: 2}" },
{ "FOFD1350", "\"$1\": component specifier not available" },
- { "FOFI0001", "\"$1\": not castable to xs:language" },
- { "FOFI0002", "invalid argument in format-integer: $1" },
{ "FOFL0001", "dynamic call on context-dependent function item" },
{ "FONS0004", "\"$1\": no namespace found for prefix" },
{ "FONS0005", "base-URI not defined in the static context" },
@@ -618,9 +616,22 @@
{ "~FOCA0002_BadLexicalQName_2", "\"$2\": value is not a valid lexical QName" },
{ "~FOCA0002_NoCastTo_234", "\"$2\": value of type $3 is not castable to type $4" },
{ "~FOCA0002_NoURIforPrefix_2", "no namespace URI provided for prefix in lexical QName \"$2\"" },
+ { "~FODF1310_BadCharacter_3", "'$3': invalid character" },
+ { "~FODF1310_BadFormatModifierHere_3", "'$3': valid format modifier invalid here" },
+ { "~FODF1310_BadFormatModifier_3", "'$3': invalid format modifier" },
+ { "~FODF1310_DigitNotSameFamily_34", "\"$3\": digit not from same digit family as $4" },
+ { "~FODF1310_DupFormatModifier_3", "\"$3\": duplicate format modifier" },
+ { "~FODF1310_EmptyFormat", "empty primary format" },
+ { "~FODF1310_NoAdjacentGroupSep_3", "\"$3\": grouping separator must not be adjacent to others" },
+ { "~FODF1310_NoGroupSepAtEnd_3", "\"$3\": grouping separator illegal at end of decimal-digit-pattern" },
+ { "~FODF1310_NoGroupSepAtStart_3", "\"$3\": grouping separator illegal at start of decimal-digit-pattern" },
+ { "~FODF1310_NoOptDigitAfterMandatory", "\"#\": optional-digit-sign must precede all mandatory-digit-signs" },
+ { "~FOFD1340_Bad2ndModifierHere_3", "'$3': valid second presentation modifier invalid here" },
+ { "~FOFD1340_Bad2ndModifier_3", "'$3': invalid second presentation modifier" },
{ "~FOFD1340_BadComponent_3", "'$3': invalid component specifier" },
{ "~FOFD1340_BadWidthModifier", "invalid width modifier" },
{ "~FOFD1340_DigitNotSameFamily_34", "\"$3\": digit not from same digit family as $4" },
+ { "~FOFD1340_Dup2ndModifier_3", "\"$3\": duplicate second presentation modifier" },
{ "~FOFD1340_MultipleComponent_3", "'$3': multiple component specifiers between []" },
{ "~FOFD1340_MustBeOneMandatoryDigit", "there must be at least one mandatory-digit-sign" },
{ "~FOFD1340_NoAdjacentGroupSep_3", "\"$3\": grouping separator must not be adjacent to others" },
@@ -1002,14 +1013,6 @@
{ "~dynamic error", "dynamic error" },
{ "~dynamic warning", "dynamic warning" },
{ "~error", "error" },
- { "~format_integer_bad_picture_format", "bad $picture format: $2" },
- { "~format_integer_duplicated_optional_format_modifier", "duplicated optional format modifier '$2'" },
- { "~format_integer_optional_format_modifier_not_closed", "bad optional format modifier ($2), cannot find closing ')' " },
- { "~format_integer_picture_empty", "$picture parameter should not be empty" },
- { "~format_integer_unknown_optional_format_modifier_character", "unknown optional format modifier character '$2'" },
- { "~format_integer_value_1_10", "$value ($2) should be between 1 and 10 for this formatting picture" },
- { "~format_integer_value_1_20", "$value ($2) should be between 1 and 20 for this formatting picture" },
- { "~format_integer_value_gt_3000", "$value ($2) should be less than 3000 for Roman representation" },
{ "~full-text dynamic error", "full-text dynamic error" },
{ "~full-text dynamic warning", "full-text dynamic warning" },
{ "~full-text static error", "full-text static error" },
=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h 2013-03-24 19:05:42 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-04-01 02:46:27 +0000
@@ -64,8 +64,11 @@
#define ZED_XQDY0074_NoEmptyLocalname "~XQDY0074_NoEmptyLocalname"
#define ZED_XQDY0074_NameSapceConstructor "~XQDY0074_NameSapceConstructor"
#define ZED_FOFD1340_BadComponent_3 "~FOFD1340_BadComponent_3"
+#define ZED_FOFD1340_Bad2ndModifier_3 "~FOFD1340_Bad2ndModifier_3"
+#define ZED_FOFD1340_Bad2ndModifierHere_3 "~FOFD1340_Bad2ndModifierHere_3"
#define ZED_FOFD1340_BadWidthModifier "~FOFD1340_BadWidthModifier"
#define ZED_FOFD1340_DigitNotSameFamily_34 "~FOFD1340_DigitNotSameFamily_34"
+#define ZED_FOFD1340_Dup2ndModifier_3 "~FOFD1340_Dup2ndModifier_3"
#define ZED_FOFD1340_MultipleComponent_3 "~FOFD1340_MultipleComponent_3"
#define ZED_FOFD1340_MustBeOneMandatoryDigit "~FOFD1340_MustBeOneMandatoryDigit"
#define ZED_FOFD1340_NoComponent "~FOFD1340_NoComponent"
@@ -80,6 +83,16 @@
#define ZED_FOCA0002_BadLexicalQName_2 "~FOCA0002_BadLexicalQName_2"
#define ZED_FOCA0002_NoURIforPrefix_2 "~FOCA0002_NoURIforPrefix_2"
#define ZED_FOCA0002_NoCastTo_234 "~FOCA0002_NoCastTo_234"
+#define ZED_FODF1310_BadCharacter_3 "~FODF1310_BadCharacter_3"
+#define ZED_FODF1310_BadFormatModifier_3 "~FODF1310_BadFormatModifier_3"
+#define ZED_FODF1310_BadFormatModifierHere_3 "~FODF1310_BadFormatModifierHere_3"
+#define ZED_FODF1310_DigitNotSameFamily_34 "~FODF1310_DigitNotSameFamily_34"
+#define ZED_FODF1310_DupFormatModifier_3 "~FODF1310_DupFormatModifier_3"
+#define ZED_FODF1310_EmptyFormat "~FODF1310_EmptyFormat"
+#define ZED_FODF1310_NoAdjacentGroupSep_3 "~FODF1310_NoAdjacentGroupSep_3"
+#define ZED_FODF1310_NoGroupSepAtStart_3 "~FODF1310_NoGroupSepAtStart_3"
+#define ZED_FODF1310_NoGroupSepAtEnd_3 "~FODF1310_NoGroupSepAtEnd_3"
+#define ZED_FODF1310_NoOptDigitAfterMandatory "~FODF1310_NoOptDigitAfterMandatory"
#define ZED_FORG0001_BadHexDigit_2 "~FORG0001_BadHexDigit_2"
#define ZED_FORG0001_Base64BadChar_2 "~FORG0001_Base64BadChar_2"
#define ZED_FORG0001_Base64Multiple4 "~FORG0001_Base64Multiple4"
@@ -344,14 +357,6 @@
#define ZED_XUST0002_UDF_2 "~XUST0002_UDF_2"
#define ZED_ZeroLenURI "~ZeroLenURI"
#define ZED_error "~error"
-#define ZED_format_integer_bad_picture_format "~format_integer_bad_picture_format"
-#define ZED_format_integer_duplicated_optional_format_modifier "~format_integer_duplicated_optional_format_modifier"
-#define ZED_format_integer_optional_format_modifier_not_closed "~format_integer_optional_format_modifier_not_closed"
-#define ZED_format_integer_picture_empty "~format_integer_picture_empty"
-#define ZED_format_integer_unknown_optional_format_modifier_character "~format_integer_unknown_optional_format_modifier_character"
-#define ZED_format_integer_value_1_10 "~format_integer_value_1_10"
-#define ZED_format_integer_value_1_20 "~format_integer_value_1_20"
-#define ZED_format_integer_value_gt_3000 "~format_integer_value_gt_3000"
#define ZED_warning "~warning"
#define ZED_xqueryx_empty_content "~xqueryx_empty_content"
#define ZED_ParseFragmentOptionCombinationNotAllowed "~ParseFragmentOptionCombinationNotAllowed"
=== modified file 'src/runtime/CMakeLists.txt'
--- src/runtime/CMakeLists.txt 2013-03-27 07:55:14 +0000
+++ src/runtime/CMakeLists.txt 2013-04-01 02:46:27 +0000
@@ -132,7 +132,7 @@
json/jsonml_array.cpp
json/snelson.cpp
numerics/NumericsImpl.cpp
- numerics/format_integer_impl.cpp
+ numerics/format_integer.cpp
sequences/SequencesImpl.cpp
visitors/iterprinter.cpp
update/update.cpp
=== modified file 'src/runtime/durations_dates_times/format_dateTime.cpp'
--- src/runtime/durations_dates_times/format_dateTime.cpp 2013-03-28 05:22:18 +0000
+++ src/runtime/durations_dates_times/format_dateTime.cpp 2013-04-01 02:46:27 +0000
@@ -18,18 +18,14 @@
// standard
#include <algorithm>
-#include <cctype>
#include <cmath>
#include <cstdlib>
-#include <functional>
#include <iomanip>
#include <iostream>
#include <sstream>
// Zorba
#include "context/dynamic_context.h"
-#include "context/static_context.h"
-#include "runtime/core/arithmetic_impl.h"
#include "runtime/visitors/planiter_visitor.h"
#include "store/api/item.h"
#include "store/api/item_factory.h"
@@ -41,8 +37,6 @@
#include "util/time_util.h"
#include "util/utf8_util.h"
#include "zorbatypes/datetime.h"
-#include "zorbatypes/datetime/parse.h"
-#include "zorbatypes/duration.h"
#include "zorbatypes/zstring.h"
#include "zorbautils/locale.h"
@@ -79,13 +73,13 @@
military_tz // 'Z' : A B C ... J ... X Y Z
};
- enum second_co_type {
+ enum co_type {
no_second_co,
cardinal, // 'c': 7 or seven
ordinal // 'o': 7th or seventh
};
- enum second_at_type {
+ enum at_type {
no_second_at,
alphabetic, // 'a'
traditional // 't'
@@ -102,9 +96,9 @@
} first;
struct {
- second_co_type co_type;
+ co_type co;
zstring co_string;
- second_at_type at_type;
+ at_type at;
} second;
width_type min_width;
@@ -112,7 +106,7 @@
//
// This stuff isn't part of the "presentation modifier" as discussed in the
- // XQuery3.0 F&O spec, but this is a convenient place to put it nonetheless.
+ // XQuery 3.0 F&O spec, but this is a convenient place to put it nonetheless.
//
iso639_1::type lang;
bool lang_is_fallback;
@@ -162,8 +156,8 @@
first.type = arabic;
first.has_grouping_separators = false;
first.zero = '0';
- second.co_type = cardinal;
- second.at_type = no_second_at;
+ second.co = cardinal;
+ second.at = no_second_at;
min_width = max_width = 0;
};
@@ -173,219 +167,20 @@
///////////////////////////////////////////////////////////////////////////////
-zstring alpha( unsigned n, bool capital ) {
- zstring result;
- if ( n ) {
- char const c = capital ? 'A' : 'a';
- while ( n ) {
- unsigned const m = n - 1;
- result.insert( (zstring::size_type)0, 1, c + m % 26 );
- n = m / 26;
- }
- } else
- result = "0";
- return result;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-namespace english_impl {
-
-// Based on code from:
-// http://www.cprogramming.com/challenges/integer-to-english-sol.html
-
-static string const ones[][2] = {
- { "", "" },
- { "one", "first" },
- { "two", "second" },
- { "three", "third" },
- { "four", "fourth" },
- { "five", "fifth" },
- { "six", "sixth" },
- { "seven", "seventh" },
- { "eight", "eighth" },
- { "nine", "ninth" },
- { "ten", "tenth" },
- { "eleven", "eleventh" },
- { "twelve", "twelfth" },
- { "thirteen", "thirteenth" },
- { "fourteen", "fourteenth" },
- { "fifteen", "fifteenth" },
- { "sixteen", "sixteenth" },
- { "seventeen", "seventeenth" },
- { "eighteen", "eighteenth" },
- { "nineteen", "nineteenth" }
-};
-
-static zstring const tens[][2] = {
- { "", "" },
- { "", "" },
- { "twenty", "twentieth" },
- { "thirty", "thirtieth" },
- { "forty", "fortieth" },
- { "fifty", "fiftieth" },
- { "sixty", "sixtieth" },
- { "seventy", "seventieth" },
- { "eighty", "eighteenth" },
- { "ninety", "ninetieth" }
-};
-
-// Enough entries to print English for 64-bit integers.
-static zstring const big[][2] = {
- { "", "" },
- { "thousand", "thousandth" },
- { "million", "millionth" },
- { "billion", "billionth" },
- { "trillion", "trillionth" },
- { "quadrillion", "quadrillionth" },
- { "quintillion", "quintillionth" }
-};
-
-inline zstring if_space( zstring const &s ) {
- return s.empty() ? "" : ' ' + s;
-}
-
-static zstring hundreds( int64_t n, bool ordinal ) {
- if ( n < 20 )
- return ones[ n ][ ordinal ];
- zstring const tmp( if_space( ones[ n % 10 ][ ordinal ] ) );
- return tens[ n / 10 ][ ordinal && tmp.empty() ] + tmp;
-}
-
-} // namespace english_impl
-
-/**
- * Converts a signed integer to English, e.g, 42 becomes "forty two".
- *
- * @param n The integer to convert.
- * @param ordinal If \c true, ordinal words ("forty second") are returned.
- * @return Returns \a n in English.
- */
-static zstring english( int64_t n, bool ordinal = false ) {
- using namespace english_impl;
-
- if ( !n )
- return ordinal ? "zeroth" : "zero";
-
- bool const negative = n < 0;
- if ( negative )
- n = -n;
-
- int big_count = 0;
- bool big_ordinal = ordinal;
- zstring r;
-
- while ( n ) {
- if ( int64_t const m = n % 1000 ) {
- zstring s;
- if ( m < 100 )
- s = hundreds( m, ordinal );
- else {
- zstring const tmp( if_space( hundreds( m % 100, ordinal ) ) );
- s = ones[ m / 100 ][0] + ' '
- + (ordinal && tmp.empty() ? "hundredth" : "hundred") + tmp;
- }
- zstring const tmp( if_space( r ) );
- r = s + if_space( big[ big_count ][ big_ordinal && tmp.empty() ] + tmp );
- big_ordinal = false;
- }
- n /= 1000;
- ++big_count;
- ordinal = false;
- }
-
- if ( negative )
- r = "negative " + r;
- return r;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-static bool is_grouping_separator( unicode::code_point cp ) {
- using namespace unicode;
- //
- // XQuery 3.0 F&O: 4.6.1: a grouping-separator-sign is a non-alphanumeric
- // character, that is a character whose Unicode category is other than Nd,
- // Nl, No, Lu, Ll, Lt, Lm or Lo.
- //
- return !( is_category( cp, Nd )
- || is_category( cp, Nl )
- || is_category( cp, No )
- || is_category( cp, Lu )
- || is_category( cp, Ll )
- || is_category( cp, Lt )
- || is_category( cp, Lm )
- || is_category( cp, Lo )
- );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-/**
- * Returns the English ordinal suffix for an integer, e.g., "st" for 1, "nd"
- * for 2, etc.
- *
- * @param n The integer to return the ordinal suffix for.
- * @return Returns said suffix.
- */
-static char const* ordinal( int n ) {
- n = std::abs( n );
- switch ( n % 100 ) {
- case 11:
- case 12:
- case 13:
- break;
- default:
- switch ( n % 10 ) {
- case 1: return "st";
- case 2: return "nd";
- case 3: return "rd";
- }
- }
- return "th";
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-/**
- * A unary_function to convert a (presumed) lower-case string to title-case
- * "Like This."
- */
-class to_title : public unary_function<char,char> {
-public:
- to_title() : capitalize_( true ) { }
-
- result_type operator()( argument_type c ) {
- if ( ascii::is_alpha( c ) ) {
- if ( capitalize_ ) {
- c = ascii::to_upper( c );
- capitalize_ = false;
- }
- } else if ( ascii::is_space( c ) )
- capitalize_ = true;
- return c;
- };
-
-private:
- bool capitalize_;
-};
-
-///////////////////////////////////////////////////////////////////////////////
-
static void append_number( int n, modifier const &mod, zstring *dest ) {
switch ( mod.first.type ) {
case modifier::arabic: {
utf8::itou_buf_type buf;
zstring tmp( utf8::itou( n, buf, mod.first.zero ) );
- if ( mod.second.co_type == modifier::ordinal )
- tmp += ordinal( n );
+ if ( mod.second.co == modifier::ordinal )
+ tmp += ztd::ordinal( n );
*dest += mod.left_pad_zero( &tmp );
break;
}
case modifier::alpha:
case modifier::ALPHA: {
- zstring tmp( alpha( n, mod.first.type == modifier::ALPHA ) );
+ zstring tmp( ztd::alpha( n, mod.first.type == modifier::ALPHA ) );
*dest += mod.right_pad_space( &tmp );
break;
}
@@ -402,20 +197,20 @@
}
case modifier::words: {
- zstring tmp( english( n, mod.second.co_type == modifier::ordinal ) );
+ zstring tmp( ztd::english( n, mod.second.co == modifier::ordinal ) );
*dest += mod.right_pad_space( &tmp );
break;
}
case modifier::Words: {
- zstring tmp( english( n, mod.second.co_type == modifier::ordinal ) );
- std::transform( tmp.begin(), tmp.end(), tmp.begin(), to_title() );
+ zstring tmp( ztd::english( n, mod.second.co == modifier::ordinal ) );
+ std::transform( tmp.begin(), tmp.end(), tmp.begin(), ascii::to_title() );
*dest += mod.right_pad_space( &tmp );
break;
}
case modifier::WORDS: {
- zstring tmp( english( n, mod.second.co_type == modifier::ordinal ) );
+ zstring tmp( ztd::english( n, mod.second.co == modifier::ordinal ) );
ascii::to_upper( tmp );
*dest += mod.right_pad_space( &tmp );
break;
@@ -607,7 +402,7 @@
tmp = "GMT";
}
- if ( mod.second.at_type == modifier::traditional && !hour && !min ) {
+ if ( mod.second.at == modifier::traditional && !hour && !min ) {
//
// Ibid: If the first presentation modifier is numeric, in any of the
// above formats, and the second presentation modifier is t, then a
@@ -644,7 +439,7 @@
++hm_width[ grouping_separators ];
continue;
}
- if ( got_digit && is_grouping_separator( cp ) ) {
+ if ( got_digit && unicode::is_grouping_separator( cp ) ) {
if ( ++grouping_separators == 1 ) {
zstring tmp2( utf8::itou( hour, buf, mod.first.zero ) );
tmp += utf8::left_pad( &tmp2, hm_width[0], mod.first.zero );
@@ -820,7 +615,7 @@
utf8_string<zstring> u_mod_format( mod->first.format );
unicode::code_point cp = *u;
- if ( cp != '#' && is_grouping_separator( cp ) ) {
+ if ( cp != '#' && unicode::is_grouping_separator( cp ) ) {
//
// XQuery 3.0 F&O: 4.6.1: A grouping-separator-sign must not appear
// at the start ... of the decimal-digit-pattern ....
@@ -912,7 +707,7 @@
break;
else if ( unicode::is_space( cp ) )
continue;
- else if ( is_grouping_separator( cp ) ) {
+ else if ( unicode::is_grouping_separator( cp ) ) {
if ( cp == ',' && !--commas ) {
//
// Ibid: if a variable marker contains one or more commas, then the
@@ -1016,6 +811,37 @@
mod->first.parsed = true;
}
+static void parse_variation( utf8_string<zstring const> const &u_picture_str,
+ utf8_string<zstring const>::const_iterator *u,
+ modifier *mod, QueryLoc const &loc ) {
+ utf8_string<zstring const>::const_iterator &v = *u;
+ if ( v == u_picture_str.end() )
+ return;
+ if ( *v == '(' ) {
+ //
+ // XQuery F&O 3.0 4.6.1: The string of characters between the parentheses,
+ // if present, is used to select between other possible variations of
+ // cardinal or ordinal numbering sequences. The interpretation of this
+ // string is implementation-defined. No error occurs if the implementation
+ // does not define any interpretation for the defined string.
+ //
+ utf8_string<zstring> u_pic_co_string( mod->second.co_string );
+ while ( true ) {
+ if ( ++v == u_picture_str.end() )
+ throw XQUERY_EXCEPTION(
+ err::FOFD1340,
+ ERROR_PARAMS( *u_picture_str.get(), ZED( CharExpected_3 ), ')' ),
+ ERROR_LOC( loc )
+ );
+ unicode::code_point const cp = *v;
+ if ( cp == ')' )
+ break;
+ u_pic_co_string += cp;
+ }
+ ++v;
+ }
+}
+
static void parse_second_modifier( zstring const &picture_str,
zstring::const_iterator *i, modifier *mod,
QueryLoc const &loc ) {
@@ -1023,29 +849,86 @@
ascii::skip_whitespace( picture_str, &j );
if ( j == picture_str.end() )
return;
- switch ( *j ) {
- case 'c': mod->second.co_type = modifier::cardinal ; break;
- case 'o': mod->second.co_type = modifier::ordinal ; break;
- case 'a': mod->second.at_type = modifier::alphabetic ; ++j; return;
- case 't': mod->second.at_type = modifier::traditional; ++j; return;
- default : return;
- }
- if ( ++j == picture_str.end() )
- return;
- if ( *j == '(' ) {
- while ( true ) {
- if ( ++j == picture_str.end() )
+
+ unicode::code_point cp;
+ bool got_c, got_o, got_a, got_t;
+ got_c = got_o = got_a = got_t = false;
+ utf8_string<zstring const> const u_picture_str( picture_str );
+ utf8_string<zstring const>::const_iterator u( u_picture_str.current( j ) );
+
+ while ( u != u_picture_str.end() ) {
+ cp = *u++;
+ switch ( cp ) {
+ case ']':
+ return;
+ case 'c':
+ if ( got_c )
+ goto dup_2nd_modifier;
+ if ( got_o || got_a || got_t )
+ goto bad_2nd_modifier_here;
+ got_c = true;
+ mod->second.co = modifier::cardinal;
+ parse_variation( u_picture_str, &u, mod, loc );
+ break;
+ case 'o':
+ if ( got_o )
+ goto dup_2nd_modifier;
+ if ( got_c || got_a || got_t )
+ goto bad_2nd_modifier_here;
+ got_o = true;
+ mod->second.co = modifier::ordinal;
+ parse_variation( u_picture_str, &u, mod, loc );
+ break;
+ case 'a':
+ if ( got_a )
+ goto dup_2nd_modifier;
+ if ( got_t )
+ goto bad_2nd_modifier_here;
+ got_a = true;
+ mod->second.at = modifier::alphabetic;
+ break;
+ case 't':
+ if ( got_t )
+ goto dup_2nd_modifier;
+ if ( got_a )
+ goto bad_2nd_modifier_here;
+ got_t = true;
+ mod->second.at = modifier::traditional;
+ break;
+ default:
throw XQUERY_EXCEPTION(
err::FOFD1340,
- ERROR_PARAMS( picture_str, ZED( CharExpected_3 ), ')' ),
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FOFD1340_Bad2ndModifier_3 ),
+ unicode::printable_cp( cp )
+ ),
ERROR_LOC( loc )
);
- if ( *j == ')' )
- break;
- mod->second.co_string += *j;
- }
- ++j;
- }
+ } // switch
+ } // while
+ j = u.base();
+ return;
+
+bad_2nd_modifier_here:
+ throw XQUERY_EXCEPTION(
+ err::FOFD1340,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FOFD1340_Bad2ndModifierHere_3 ),
+ unicode::printable_cp( cp )
+ )
+ );
+
+dup_2nd_modifier:
+ throw XQUERY_EXCEPTION(
+ err::FOFD1340,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FOFD1340_Dup2ndModifier_3 ),
+ unicode::printable_cp( cp )
+ )
+ );
}
static void parse_width_modifier( zstring const &picture_str,
@@ -1136,7 +1019,7 @@
store::Item_t item;
PlanIteratorState *state;
- DEFAULT_STACK_INIT( PlanIteratorState, state, planState);
+ DEFAULT_STACK_INIT( PlanIteratorState, state, planState );
if ( !consumeNext( item, theChildren[0].getp(), planState ) ) {
// Got the empty sequence -- return same
@@ -1283,9 +1166,11 @@
if ( i == picture_str.end() )
goto eos;
if ( *i != ']' ) {
- parse_second_modifier( picture_str, &i, &mod, loc );
- if ( i == picture_str.end() )
- goto eos;
+ if ( *i != ',' && *i != ';' ) {
+ parse_second_modifier( picture_str, &i, &mod, loc );
+ if ( i == picture_str.end() )
+ goto eos;
+ }
parse_width_modifier( picture_str, &i, &mod, loc );
if ( i == picture_str.end() )
goto eos;
=== renamed file 'src/runtime/numerics/format_integer_impl.cpp' => 'src/runtime/numerics/format_integer.cpp'
--- src/runtime/numerics/format_integer_impl.cpp 2013-02-28 11:15:32 +0000
+++ src/runtime/numerics/format_integer.cpp 2013-04-01 02:46:27 +0000
@@ -1,12 +1,12 @@
/*
* Copyright 2006-2008 The FLWOR Foundation.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -15,962 +15,818 @@
*/
#include "stdafx.h"
+// standard
+#include <sstream>
#include <vector>
-#include <zorba/config.h>
-
+// Zorba
#include "common/shared_types.h"
-
-#include "diagnostics/assert.h"
+#include "context/dynamic_context.h"
+#include "context/static_context.h"
#include "diagnostics/xquery_diagnostics.h"
-#include "zorbatypes/zorbatypes_decl.h"
-#include "zorbatypes/numconversions.h"
-
+#include "runtime/core/arithmetic_impl.h"
+#include "runtime/numerics/numerics.h"
+#include "runtime/visitors/planiter_visitor.h"
+#include "store/api/item.h"
+#include "store/api/item_factory.h"
#include "system/globalenv.h"
-
#include "util/ascii_util.h"
-#include "util/tracer.h"
+#include "util/stream_util.h"
#include "util/unicode_util.h"
#include "util/utf8_string.h"
-
-#include "types/casting.h"
-#include "types/typeconstants.h"
-#include "types/typeops.h"
-
-#include "context/static_context.h"
-
-// TODO: remove, debugging purposes only
-#include "context/dynamic_context.h"
-
-#include "compiler/api/compilercb.h"
-
-#include "runtime/numerics/numerics.h"
-#include "runtime/visitors/planiter_visitor.h"
-#include "runtime/core/arithmetic_impl.h"
-
-#include "store/api/item_factory.h"
-#include "store/api/item.h"
-
-namespace zorba
-{
-
-xs_integer FormatIntegerIterator::StringToXsInteger(const char *str)
-{
- return xs_integer(str);
-}
-
-void FormatIntegerIterator::checkOptionalModifier(utf8_string<zstring> &utf8_picture,
- unsigned int off,
- bool *is_ordinal,
- bool *is_traditional,
- utf8_string<zstring> &word_terminal)
-{
- size_t picture_size = utf8_picture.size();
- *is_ordinal = false;
- *is_traditional = false;
- unsigned int i=0;
- bool is_ordinal_set = false;
- bool is_traditional_set = false;
- utf8_string<zstring>::value_type c;
- for(i=0;i<2;i++)
- {
- if(picture_size <= (off+i))
- return;
- c = utf8_picture[off+i];
- switch(c)
- {
- case 'c':
- if(is_ordinal_set)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_duplicated_optional_format_modifier), (char)c));
- }
- is_ordinal_set = true;
- *is_ordinal = false;
- break;
- case 'o':
- if(is_ordinal_set)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_duplicated_optional_format_modifier), (char)c));
- }
- is_ordinal_set = true;
- *is_ordinal = true;
- break;
- case 'a':
- if(is_traditional_set)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_duplicated_optional_format_modifier), (char)c));
- }
- is_traditional_set = true;
- *is_traditional = false;
- break;
- case 't':
- if(is_traditional_set)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_duplicated_optional_format_modifier), (char)c));
- }
- is_traditional_set = true;
- *is_traditional = true;
+#include "zorbatypes/numconversions.h"
+
+using namespace std;
+using namespace zorba::locale;
+
+namespace zorba {
+
+///////////////////////////////////////////////////////////////////////////////
+
+struct picture {
+ enum primary_type {
+ arabic, // '1' : 0 1 2 ... 10 11 12 ...
+ alpha, // 'a' : a b c ... z aa ab ac ...
+ ALPHA, // 'A' : A B C ... Z AA AB AC ...
+ one, // limited-range integer sequence
+ roman, // 'i' : i ii iii iv v vi vii viii ix x ...
+ ROMAN, // 'I' : I II III IV V VI VII VIII IX X ...
+ words, // 'w' : one two three four ...
+ Words, // 'Ww': One Two Three Four ...
+ WORDS // 'W' : ONE TWO THREE FOUR ...
+ };
+
+ enum co_type {
+ no_co,
+ cardinal, // 'c': 7 or seven
+ ordinal // 'o': 7th or seventh
+ };
+
+ enum at_type {
+ no_at,
+ alphabetic, // 'a'
+ traditional, // 't'
+ };
+
+ struct {
+ primary_type type;
+ zstring format;
+ int grouping_interval;
+ int mandatory_digits;
+ int mandatory_grouping_seps;
+ unicode::code_point zero, one;
+ } primary;
+
+ struct {
+ co_type co;
+ zstring co_string;
+ at_type at;
+ } modifier;
+
+ //
+ // This stuff isn't part of the "presentation modifier" as discussed in the
+ // XQuery 3.0 F&O spec, but this is a convenient place to put it nonetheless.
+ //
+ iso639_1::type lang;
+ bool lang_is_fallback;
+ iso3166_1::type country;
+
+ picture() {
+ primary.type = arabic;
+ primary.grouping_interval = 0;
+ primary.mandatory_digits = 0;
+ primary.mandatory_grouping_seps = 0;
+ primary.zero = '0';
+ modifier.co = cardinal;
+ modifier.at = no_at;
+ }
+
+ // default picture(picture const&) is fine
+ // default picture& operator=(picture const&) is fine
+};
+
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ * For a code-point of a format token that represents the number 1, gets the
+ * range of values said token can be used to format.
+ *
+ * @param cp The code-point of a format token that represents the number 1.
+ * @param min A pointer to an \c int to receive the minimum value of the range.
+ * @param max A pointer to an \c int to receive the maximum value of the range.
+ */
+static bool get_one_range( unicode::code_point cp, int *min, int *max ) {
+ using namespace unicode;
+ switch ( cp ) {
+ case CIRCLED_DIGIT_ONE:
+ case DIGIT_ONE_FULL_STOP:
+ case DINGBAT_NEGATIVE_CIRCLED_DIGIT_ONE:
+ case PARENTHESIZED_DIGIT_ONE:
+ *min = 1, *max = 20;
+ break;
+ case CIRCLED_IDEOGRAPH_ONE:
+ case DINGBAT_CIRCLED_SANS_SERIF_DIGIT_ONE:
+ case DINGBAT_NEGATIVE_CIRCLED_SANS_SERIF_DIGIT_ONE:
+ case DOUBLE_CIRCLED_DIGIT_ONE:
+ case PARENTHESIZED_IDEOGRAPH_ONE:
+ *min = 1, *max = 10;
+ break;
+ case ROMAN_NUMERAL_ONE:
+ case SMALL_ROMAN_NUMERAL_ONE:
+ *min = 1, *max = 12;
+ break;
+ case SUBSCRIPT_ONE:
+ case SUPERSCRIPT_ONE:
+ *min = 0, *max = 9;
break;
default:
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_unknown_optional_format_modifier_character), (char)c));
- }
- }
- if(picture_size <= (off+i))
- return;
- c = utf8_picture[off+i];
- if(c != '(')
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_unknown_optional_format_modifier_character), (char)c));
- }
- i++;
- bool has_dash = false;
- while((off+i) < picture_size)
- {
- c = utf8_picture[off+i];
- if(c == ')')
- break;
- if(c == '-')
- {
- if(has_dash)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_unknown_optional_format_modifier_character), (char)c));
- }
- has_dash = true;
- }
- else if(has_dash)
- word_terminal += c;
- i++;
- }
- if((off+i) >= picture_size)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_optional_format_modifier_not_closed), utf8_picture));
- }
- i++;
- if((off+i) < picture_size)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_unknown_optional_format_modifier_character), (char)utf8_picture[off+i]));
- }
-}
-
-/*
- represent integer as sequence of letters A, B, ... Z, AA, AB, ....
- 'A' is 1
- 0 is empty string
- The sequence includes the characters 'I' and 'O'
- There is no upper limit for the input integer
-*/
-void FormatIntegerIterator::formatIntegerAZ(xs_integer valueInteger, char c0, zstring &resultString)
-{
- static const unsigned int letter_range = 'Z' - 'A' + 1;
- static xs_integer integer_digit(letter_range);
- xs_integer upper_int = valueInteger/integer_digit;
- if(upper_int > 0)
- formatIntegerAZ(upper_int - 1, c0, resultString);
- xs_integer mod_integer = valueInteger % integer_digit;
- xs_int mod_int = to_xs_int(mod_integer);
- resultString += (c0 + mod_int);
-}
-
-void FormatIntegerIterator::formatIntegerRoman(xs_integer valueInteger, zstring &resultString)
-{
- static xs_integer integer_3000(3000);
- static xs_integer integer_1000(1000);
- static xs_integer integer_900(900);
- static xs_integer integer_800(800);
- static xs_integer integer_700(700);
- static xs_integer integer_600(600);
- static xs_integer integer_500(500);
- static xs_integer integer_400(400);
- static xs_integer integer_300(300);
- static xs_integer integer_200(200);
- static xs_integer integer_100(100);
- static xs_integer integer_90(90);
- static xs_integer integer_80(80);
- static xs_integer integer_70(70);
- static xs_integer integer_60(60);
- static xs_integer integer_50(50);
- static xs_integer integer_40(40);
- static xs_integer integer_30(30);
- static xs_integer integer_20(20);
- static xs_integer integer_10(10);
- static xs_integer integer_9(9);
- static xs_integer integer_8(8);
- static xs_integer integer_7(7);
- static xs_integer integer_6(6);
- static xs_integer integer_5(5);
- static xs_integer integer_4(4);
- static xs_integer integer_3(3);
- static xs_integer integer_2(2);
- static xs_integer integer_1(1);
-
- if (valueInteger > integer_3000)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_value_gt_3000), valueInteger));
- }
- else if (valueInteger >= integer_1000)
- {
- resultString += "M";
- formatIntegerRoman(valueInteger - integer_1000, resultString);
- }
- else if (valueInteger >= integer_900)
- {
- resultString += "CM";
- formatIntegerRoman(valueInteger - integer_900, resultString);
- }
- else if (valueInteger >= integer_800)
- {
- resultString += "DCCC";
- formatIntegerRoman(valueInteger - integer_800, resultString);
- }
- else if (valueInteger >= integer_700)
- {
- resultString += "DCC";
- formatIntegerRoman(valueInteger - integer_700, resultString);
- }
- else if (valueInteger >= integer_600)
- {
- resultString += "DC";
- formatIntegerRoman(valueInteger - integer_600, resultString);
- }
- else if (valueInteger >= integer_500)
- {
- resultString += "D";
- formatIntegerRoman(valueInteger - integer_500, resultString);
- }
- else if (valueInteger >= integer_400)
- {
- resultString += "CD";
- formatIntegerRoman(valueInteger - integer_400, resultString);
- }
- else if (valueInteger >= integer_300)
- {
- resultString += "CCC";
- formatIntegerRoman(valueInteger - integer_300, resultString);
- }
- else if (valueInteger >= integer_200)
- {
- resultString += "CC";
- formatIntegerRoman(valueInteger - integer_200, resultString);
- }
- else if (valueInteger >= integer_100)
- {
- resultString += "C";
- formatIntegerRoman(valueInteger - integer_100, resultString);
- }
- else if (valueInteger >= integer_90)
- {
- resultString += "XC";
- formatIntegerRoman(valueInteger - integer_90, resultString);
- }
- else if (valueInteger >= integer_80)
- {
- resultString += "LXXX";
- formatIntegerRoman(valueInteger - integer_80, resultString);
- }
- else if (valueInteger >= integer_70)
- {
- resultString += "LXX";
- formatIntegerRoman(valueInteger - integer_70, resultString);
- }
- else if (valueInteger >= integer_60)
- {
- resultString += "LX";
- formatIntegerRoman(valueInteger - integer_60, resultString);
- }
- else if (valueInteger >= integer_50)
- {
- resultString += "L";
- formatIntegerRoman(valueInteger - integer_50, resultString);
- }
- else if (valueInteger >= integer_40)
- {
- resultString += "XL";
- formatIntegerRoman(valueInteger - integer_40, resultString);
- }
- else if (valueInteger >= integer_30)
- {
- resultString += "XXX";
- formatIntegerRoman(valueInteger - integer_30, resultString);
- }
- else if (valueInteger >= integer_20)
- {
- resultString += "XX";
- formatIntegerRoman(valueInteger - integer_20, resultString);
- }
- else if (valueInteger >= integer_10)
- {
- resultString += "X";
- formatIntegerRoman(valueInteger - integer_10, resultString);
- }
- else if (valueInteger == integer_9)
- {
- resultString += "IX";
- }
- else if (valueInteger == integer_8)
- {
- resultString += "VIII";
- }
- else if (valueInteger == integer_7)
- {
- resultString += "VII";
- }
- else if (valueInteger == integer_6)
- {
- resultString += "VI";
- }
- else if (valueInteger == integer_5)
- {
- resultString += "V";
- }
- else if (valueInteger == integer_4)
- {
- resultString += "IV";
- }
- else if (valueInteger == integer_3)
- {
- resultString += "III";
- }
- else if (valueInteger == integer_2)
- {
- resultString += "II";
- }
- else if (valueInteger == integer_1)
- {
- resultString += "I";
- }
-}
-
-void FormatIntegerIterator::formatIntegerEnglish(xs_integer valueInteger, bool is_ordinal, zstring &resultString)
-{
- //10^303
-#ifdef ZORBA_WITH_BIG_INTEGER
- static xs_integer integer_centillion = StringToXsInteger("1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
- //10^63
- static xs_integer integer_vigintillion = StringToXsInteger("1000000000000000000000000000000000000000000000000000000000000000");
- //10^60
- static xs_integer integer_novemdecillion = StringToXsInteger("1000000000000000000000000000000000000000000000000000000000000");
- //10^57
- static xs_integer integer_octodecillion = StringToXsInteger("1000000000000000000000000000000000000000000000000000000000");
- //10^54
- static xs_integer integer_septendecillion =StringToXsInteger("1000000000000000000000000000000000000000000000000000000");
- //10^51
- static xs_integer integer_sexdecillion = StringToXsInteger("1000000000000000000000000000000000000000000000000000");
- //10^48
- static xs_integer integer_quindecillion = StringToXsInteger("1000000000000000000000000000000000000000000000000");
- //10^45
- static xs_integer integer_quattuordecillion=StringToXsInteger("1000000000000000000000000000000000000000000000");
- //10^42
- static xs_integer integer_tredecillion = StringToXsInteger("1000000000000000000000000000000000000000000");
- //10^39
- static xs_integer integer_duodecillion = StringToXsInteger("1000000000000000000000000000000000000000");
- //10^36
- static xs_integer integer_undecillion = StringToXsInteger("1000000000000000000000000000000000000");
- //10^33
- static xs_integer integer_decillion = StringToXsInteger("1000000000000000000000000000000000");
- //10^30
- static xs_integer integer_nonillion = StringToXsInteger("1000000000000000000000000000000");
- //10^27
- static xs_integer integer_octillion = StringToXsInteger("1000000000000000000000000000");
- //10^24
- static xs_integer integer_septillion = StringToXsInteger("1000000000000000000000000");
- //10^21
- static xs_integer integer_sextillion = StringToXsInteger("1000000000000000000000");
-#endif /* ZORBA_WITH_BIG_INTEGER */
- //10^18
- static xs_integer integer_quintillion = StringToXsInteger("1000000000000000000");
- //10^15
- static xs_integer integer_quadrillion = StringToXsInteger("1000000000000000");
- //10^12
- static xs_integer integer_trillion = StringToXsInteger("1000000000000");
- //10^9
- static xs_integer integer_billion(1000000000);
- //10^6
- static xs_integer integer_million(1000000);
- //10^3
- static xs_integer integer_thousand(1000);
- //10^2
- static xs_integer integer_hundred(100);
- static xs_integer integer_90(90);
- static xs_integer integer_80(80);
- static xs_integer integer_70(70);
- static xs_integer integer_60(60);
- static xs_integer integer_50(50);
- static xs_integer integer_40(40);
- static xs_integer integer_30(30);
- static xs_integer integer_20(20);
- static xs_integer integer_19(19);
- static xs_integer integer_18(18);
- static xs_integer integer_17(17);
- static xs_integer integer_16(16);
- static xs_integer integer_15(15);
- static xs_integer integer_14(14);
- static xs_integer integer_13(13);
- static xs_integer integer_12(12);
- static xs_integer integer_11(11);
- static xs_integer integer_10(10);
- static xs_integer integer_9(9);
- static xs_integer integer_8(8);
- static xs_integer integer_7(7);
- static xs_integer integer_6(6);
- static xs_integer integer_5(5);
- static xs_integer integer_4(4);
- static xs_integer integer_3(3);
- static xs_integer integer_2(2);
- static xs_integer integer_1(1);
-
- xs_integer value_mod;
-
-#define IF_GE(big_number_name) \
- else if (valueInteger >= integer_##big_number_name) \
- { \
- formatIntegerEnglish(valueInteger/integer_##big_number_name, false, resultString); \
- resultString += " " #big_number_name; \
- value_mod = valueInteger % integer_##big_number_name; \
- if(value_mod > 0) \
- { \
- resultString += " "; \
- formatIntegerEnglish(value_mod, is_ordinal, resultString); \
- } \
- else if(is_ordinal) \
- resultString += "th"; \
- }
-
-#define IF_GE_DECIM(decim, decim_cardinal, decim_ordinal) \
- else if (valueInteger >= integer_##decim) \
- { \
- value_mod = valueInteger % integer_##decim; \
- if(value_mod > 0) \
- { \
- resultString += decim_cardinal; \
- resultString += "-"; \
- formatIntegerEnglish(value_mod, is_ordinal, resultString); \
- } \
- else if(!is_ordinal) \
- resultString += decim_cardinal; \
- else \
- resultString += decim_ordinal; \
- }
-
- if(0);
-#ifdef ZORBA_WITH_BIG_INTEGER
- IF_GE(centillion)
- IF_GE(vigintillion)
- IF_GE(novemdecillion)
- IF_GE(octodecillion)
- IF_GE(septendecillion)
- IF_GE(sexdecillion)
- IF_GE(quindecillion)
- IF_GE(quattuordecillion)
- IF_GE(tredecillion)
- IF_GE(duodecillion)
- IF_GE(undecillion)
- IF_GE(decillion)
- IF_GE(nonillion)
- IF_GE(octillion)
- IF_GE(septillion)
- IF_GE(sextillion)
-#endif /* ZORBA_WITH_BIG_INTEGER */
- IF_GE(quintillion)
- IF_GE(quadrillion)
- IF_GE(trillion)
- IF_GE(billion)
- IF_GE(million)
- IF_GE(thousand)
- IF_GE(hundred)
- IF_GE_DECIM(90, "ninety", "ninetieth")
- IF_GE_DECIM(80, "eighty", "eightieth")
- IF_GE_DECIM(70, "seventy","seventieth")
- IF_GE_DECIM(60, "sixty", "sixtieth")
- IF_GE_DECIM(50, "fifty", "fiftieth")
- IF_GE_DECIM(40, "forty", "fortieth")
- IF_GE_DECIM(30, "thirty", "thirtieth")
- IF_GE_DECIM(20, "twenty", "twentieth")
- IF_GE_DECIM(19, "nineteen", "nineteenth")
- IF_GE_DECIM(18, "eighteen", "eighteenth")
- IF_GE_DECIM(17, "seventeen", "seventeenth")
- IF_GE_DECIM(16, "sixteen", "sixteenth")
- IF_GE_DECIM(15, "fifteen", "fifteenth")
- IF_GE_DECIM(14, "fourteen", "fourteenth")
- IF_GE_DECIM(13, "thirteen", "thirteenth")
- IF_GE_DECIM(12, "twelve", "twelfth")
- IF_GE_DECIM(11, "eleven", "eleventh")
- IF_GE_DECIM(10, "ten", "tenth")
- IF_GE_DECIM(9, "nine", "ninth")
- IF_GE_DECIM(8, "eight", "eighth")
- IF_GE_DECIM(7, "seven", "seventh")
- IF_GE_DECIM(6, "six", "sixth")
- IF_GE_DECIM(5, "five", "fifth")
- IF_GE_DECIM(4, "four", "fourth")
- IF_GE_DECIM(3, "three", "third")
- IF_GE_DECIM(2, "two", "second")
- IF_GE_DECIM(1, "one", "first")
- else if (valueInteger == 0)
- {
- if(!is_ordinal)
- resultString += "zero";
- else
- resultString += "zeroth";
- }
-}
-
-bool FormatIntegerIterator::isDecimalDigitPattern(utf8_string<zstring> &utf8_picture,
- unsigned int *picture_size,
- unsigned int *groupingInterval,
- utf8_string<zstring>::value_type *groupingChar,
- utf8_string<zstring>::value_type *utf8zero)
-{
- //first char is either optional digit # or mandatory digit
- size_t all_size = utf8_picture.size();
- if(all_size == 0)
- return false;
- *picture_size = all_size;
- *groupingInterval = 0;
- *utf8zero = 0;
- utf8_string<zstring>::value_type prev_groupingChar = 0;
- unsigned int prev_grouping_pos = 0;
- bool can_have_grouping_interval = true;
- utf8_string<zstring>::const_iterator pictureit;
- bool is_optional = false;
- bool prev_is_grouping = false;
- bool has_digits = false;
- unsigned int pos;
- unicode::code_point zerotemp;
- //c = utf8_picture[0];
- pictureit = utf8_picture.begin();
- if(*pictureit == '#')
- is_optional = true;
- else if(unicode::is_Nd(*pictureit, &zerotemp))
- {
- *utf8zero = zerotemp;
- has_digits = true;
- }
- else
- return false;
- pos = 1;
- pictureit++;
- while(pos < all_size)
- {
- if(*pictureit == '#')
- {
- if(has_digits)
- return false;
- prev_is_grouping = false;
- }
- else if(unicode::is_Nd(*pictureit, &zerotemp))
- {
- if(*utf8zero)
- {
- if(*utf8zero != zerotemp)
- return false;
- }
- else
- *utf8zero = zerotemp;
- is_optional = false;
- has_digits = true;
- prev_is_grouping = false;
- }
- else if(!is_category(*pictureit, unicode::Nd) &&
- !is_category(*pictureit, unicode::Nl) &&
- !is_category(*pictureit, unicode::No) &&
- !is_category(*pictureit, unicode::Lu) &&
- !is_category(*pictureit, unicode::Ll) &&
- !is_category(*pictureit, unicode::Lt) &&
- !is_category(*pictureit, unicode::Lm) &&
- !is_category(*pictureit, unicode::Lo))
- {
- //is grouping
- if(prev_is_grouping)
- return false;
- prev_is_grouping = true;
- if(prev_groupingChar)
- {
- if(prev_groupingChar == *pictureit)
- {
- if(*groupingInterval)
- {
- if((pos - prev_grouping_pos) == *groupingInterval)
- prev_grouping_pos = pos;
- else
- {
- *groupingInterval = 0;
- can_have_grouping_interval = false;
- }
- }
- else if(can_have_grouping_interval)
- {
- *groupingInterval = pos - prev_grouping_pos;
- if(prev_grouping_pos > *groupingInterval)
- {
- can_have_grouping_interval = false;
- *groupingInterval = 0;
- }
- else
- prev_grouping_pos = pos;
- }
- }
+ return false;
+ }
+ return true;
+}
+
+static char const* ordinal( xs_integer const &i ) {
+ xs_integer a( i );
+ if ( a.sign() < 0 )
+ a = -a;
+ static xs_integer const ten( 10 );
+ xs_integer const a_mod_10( a % ten );
+ switch ( to_xs_int( a_mod_10 ) ) {
+ case 11:
+ case 12:
+ case 13:
+ break;
+ default: {
+ static xs_integer const hundred( 100 );
+ xs_integer const a_mod_100( a % hundred );
+ switch ( to_xs_int( a_mod_100 ) ) {
+ case 1: return "st";
+ case 2: return "nd";
+ case 3: return "rd";
+ }
+ }
+ }
+ return "th";
+}
+
+static void format_integer( xs_integer const &xs_n, picture const &pic,
+ zstring *dest ) {
+ picture default_pic;
+
+ switch ( pic.primary.type ) {
+ case picture::one:
+ //
+ // XQuery F&O 3.0: 4.6.1: For all format tokens other than [ones that
+ // consists of decimal digits], there may be implementation-defined lower
+ // and upper bounds on the range of numbers that can be formatted using
+ // this format token; indeed, for some numbering sequences there may be
+ // intrinsic limits. For example, the format token ① (circled
+ // digit one) has a range of 1 to 20 imposed by the Unicode character
+ // repertoire.
+ //
+ try {
+ xs_long const n = to_xs_long( xs_n );
+ int min, max;
+ if ( get_one_range( pic.primary.one, &min, &max ) &&
+ n >= min && n <= max ) {
+ utf8_string<zstring> u_dest( *dest );
+ u_dest = (unicode::code_point)(pic.primary.one + n - 1);
+ break;
+ }
+ //
+ // Ibid: Numbers that fall outside this range must be formatted using
+ // the format token 1.
+ //
+ format_integer( xs_n, default_pic, dest );
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+
+ case picture::arabic: {
+ xs_integer xs_n2( xs_n );
+ if ( xs_n2.sign() < 0 )
+ xs_n2 = -xs_n2;
+
+ zstring const s( xs_n2.toString() );
+ zstring::const_reverse_iterator n_i( s.rbegin() );
+ zstring::const_reverse_iterator const n_end( s.rend() );
+
+ utf8_string<zstring const> const u_pic_format( pic.primary.format );
+ utf8_string<zstring const>::const_reverse_iterator
+ pic_i( u_pic_format.rbegin() );
+ utf8_string<zstring const>::const_reverse_iterator const
+ pic_end( u_pic_format.rend() );
+
+ int digit_pos = 0;
+ unicode::code_point grouping_cp;
+ bool just_inserted_grouping_separator = false;
+ int mandatory_digits = pic.primary.mandatory_digits;
+ int mandatory_grouping_seps = pic.primary.mandatory_grouping_seps;
+ utf8_string<zstring> u_dest( *dest );
+
+ //
+ // Step through both the integer and picture from right-to-left.
+ //
+ while ( n_i != n_end || pic_i != pic_end ) {
+ unicode::code_point digit_cp = pic.primary.zero;
+ if ( n_i != n_end )
+ digit_cp += *n_i - '0';
+ if ( pic_i != pic_end ) { // haven't exhausted the picture
+ if ( !mandatory_digits && !mandatory_grouping_seps && n_i == n_end )
+ break;
+ unicode::code_point const pic_cp = *pic_i++;
+ bool const is_mandatory_digit = unicode::is_Nd( pic_cp );
+ if ( pic_cp == '#' || is_mandatory_digit ) {
+ u_dest.insert( 0, 1, digit_cp );
+ if ( n_i != n_end ) ++n_i;
+ ++digit_pos;
+ } else { // must be a grouping-separator
+ grouping_cp = pic_cp; // remember for later
+ u_dest.insert( 0, 1, grouping_cp );
+ --mandatory_grouping_seps;
+ }
+ if ( is_mandatory_digit )
+ --mandatory_digits;
+ } else { // have exhausted the picture
+ if ( pic.primary.grouping_interval &&
+ digit_pos % pic.primary.grouping_interval == 0 ) {
+ if ( just_inserted_grouping_separator )
+ just_inserted_grouping_separator = false;
+ else {
+ u_dest.insert( 0, 1, grouping_cp );
+ just_inserted_grouping_separator = true;
+ continue;
+ }
+ }
+ u_dest.insert( 0, 1, digit_cp );
+ if ( n_i != n_end ) ++n_i;
+ ++digit_pos;
+ }
+ } // while
+
+ if ( xs_n.sign() < 0 )
+ dest->insert( (zstring::size_type)0, 1, '-' );
+ if ( pic.modifier.co == picture::ordinal )
+ *dest += ordinal( xs_n );
+ break;
+ }
+
+ case picture::alpha:
+ case picture::ALPHA:
+ if ( xs_n.sign() == 0 ) {
+ //
+ // Ibid: Numbers that fall outside this range must be formatted using
+ // the format token 1.
+ //
+ *dest = '0';
+ } else
+ try {
+ xs_long n = to_xs_long( xs_n );
+ if ( n < 0 ) {
+ *dest = '-';
+ n = -n;
+ }
+ *dest += ztd::alpha( n, pic.primary.type == picture::ALPHA );
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+
+ case picture::roman:
+ case picture::ROMAN:
+ if ( xs_n.sign() == 0 ) {
+ //
+ // Ibid: Numbers that fall outside this range must be formatted using
+ // the format token 1.
+ //
+ *dest = '0';
+ } else
+ try {
+ xs_long n = to_xs_long( xs_n );
+ if ( n < 0 ) {
+ *dest = '-';
+ n = -n;
+ }
+ ostringstream oss;
+ if ( pic.primary.type == picture::ROMAN )
+ oss << uppercase;
+ oss << roman( n );
+ *dest += oss.str();
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+
+ case picture::words:
+ try {
+ xs_long const n = to_xs_long( xs_n );
+ *dest = ztd::english( n, pic.modifier.co == picture::ordinal );
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+
+ case picture::Words:
+ try {
+ xs_long const n = to_xs_long( xs_n );
+ *dest = ztd::english( n, pic.modifier.co == picture::ordinal );
+ std::transform(
+ dest->begin(), dest->end(), dest->begin(), ascii::to_title()
+ );
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+
+ case picture::WORDS:
+ try {
+ xs_long const n = to_xs_long( xs_n );
+ *dest = ztd::english( n, pic.modifier.co == picture::ordinal );
+ ascii::to_upper( *dest );
+ }
+ catch ( range_error const& ) {
+ format_integer( xs_n, default_pic, dest );
+ }
+ break;
+ } // switch
+}
+
+static void parse_primary( zstring const &picture_str,
+ zstring::const_iterator *i, picture *pic,
+ QueryLoc const &loc ) {
+ if ( picture_str.empty() ) {
+ //
+ // XQuery 3.0 F&O: 4.6.1: The primary format token is always present and
+ // must not be zero-length.
+ //
+empty_format:
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS( ZED( FODF1310_EmptyFormat ) ),
+ ERROR_LOC( loc )
+ );
+ }
+
+ //
+ // Because of:
+ //
+ // Ibid: If the string contains one or more semicolons then everything
+ // that precedes the last semicolon is taken as the primary format token
+ // and everything that follows is taken as the format modifier.
+ //
+ // we have to count the number of semicolons in order to know when we've
+ // reached the last one.
+ //
+ int semicolon_counter = 0;
+ FOR_EACH( zstring, c, picture_str )
+ if ( *c == ';' )
+ ++semicolon_counter;
+ int const semicolons = semicolon_counter;
+
+ if ( semicolons == 1 && picture_str[0] == ';' ) {
+ //
+ // This also means that the primary format token is zero-length.
+ //
+ goto empty_format;
+ }
+
+ unicode::code_point cp;
+ utf8_string<zstring const> const u_picture_str( picture_str );
+ utf8_string<zstring const>::const_iterator u;
+
+ //
+ // Determine whether the primary format token is a decimal-digit-pattern:
+ //
+ // Ibid: If the primary format token contains at least one Unicode digit
+ // then it is taken as a decimal digit pattern.
+ //
+ // and whether all digits are from the same digit family:
+ //
+ // Ibid: All mandatory-digit-signs within the format token must be from
+ // the same digit family, where a digit family is a sequence of ten
+ // consecutive characters in Unicode category Nd, having digit values 0
+ // through 9.
+ //
+ bool is_decimal_digit_pattern = false;
+ unicode::code_point zero[] = { '0', '0' };
+ semicolon_counter = semicolons;
+ for ( u = u_picture_str.begin(); u != u_picture_str.end(); ++u ) {
+ cp = *u;
+ if ( cp == ';' && !--semicolon_counter )
+ break;
+ if ( unicode::is_Nd( cp, &zero[ is_decimal_digit_pattern ] ) ) {
+ if ( is_decimal_digit_pattern && zero[1] != zero[0] ) {
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_DigitNotSameFamily_34 ),
+ unicode::printable_cp( cp ),
+ unicode::printable_cp( zero[0] )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+ is_decimal_digit_pattern = true;
+ ++pic->primary.mandatory_digits;
+ }
+ }
+
+ u = u_picture_str.begin();
+ cp = *u;
+
+ if ( is_decimal_digit_pattern ) {
+ if ( cp != '#' && unicode::is_grouping_separator( cp ) ) {
+ //
+ // Ibid: 4.6.1: A grouping-separator-sign must not appear at the start
+ // ... of the decimal-digit-pattern ....
+ //
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_NoGroupSepAtStart_3 ),
+ unicode::printable_cp( cp )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+
+ pic->primary.zero = zero[0];
+
+ utf8_string<zstring> u_pic_format( pic->primary.format );
+ u_pic_format += cp;
+
+ bool got_grouping_separator = false;
+ bool got_mandatory_digit = cp != '#';
+ int grouping_interval = 0;
+ bool grouping_interval_possible = true;
+ unicode::code_point grouping_separator_cp = 0;
+ int grouping_separators = 0;
+ zstring::size_type pos = 0, prev_grouping_pos = zstring::npos;
+
+ semicolon_counter = semicolons;
+ while ( ++u != u_picture_str.end() ) {
+ cp = *u, ++pos;
+ if ( cp == '#' ) {
+ if ( got_mandatory_digit ) {
+ //
+ // Ibid: There may be zero or more optional-digit-signs, and (if
+ // present) these must precede all mandatory-digit-signs.
+ //
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_NoOptDigitAfterMandatory )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+ got_grouping_separator = false;
+ } else if ( unicode::is_Nd( cp ) ) {
+ got_mandatory_digit = true;
+ got_grouping_separator = false;
+ } else if ( unicode::is_grouping_separator( cp ) ) {
+ if ( cp == ';' && !--semicolon_counter ) {
+ //
+ // Ibid: If the string contains one or more semicolons then
+ // everything that precedes the last semicolon is taken as the
+ // primary format token and everything that follows is taken as the
+ // format modifier.
+ //
+ break;
+ }
+ if ( got_grouping_separator ) {
+ //
+ // Ibid: A grouping-separator-sign must not appear ... adjacent to
+ // another grouping-separator-sign.
+ //
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_NoAdjacentGroupSep_3 ),
+ unicode::printable_cp( cp )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+ got_grouping_separator = true;
+ ++grouping_separators;
+
+ if ( grouping_interval_possible ) {
+ //
+ // Ibid: If grouping-separator-signs appear at regular intervals
+ // within the format token, that is if the same grouping separator
+ // appears at positions forming a sequence N, 2N, 3N, ... for some
+ // integer value N (including the case where there is only one number
+ // in the list), then the sequence is extrapolated to the left, so
+ // grouping separators will be used in the formatted number at every
+ // multiple of N. For example, if the format token is 0'000 then the
+ // number one million will be formatted as 1'000'000, while the
+ // number fifteen will be formatted as 0'015.
+ //
+ if ( !grouping_separator_cp )
+ grouping_separator_cp = cp;
+ else if ( cp != grouping_separator_cp )
+ grouping_interval_possible = false;
+ else if ( !grouping_interval )
+ grouping_interval = pos - prev_grouping_pos;
+ else if ( pos - prev_grouping_pos != grouping_interval )
+ grouping_interval_possible = false;
+ prev_grouping_pos = pos;
+ }
+ } else {
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_BadCharacter_3 ),
+ unicode::printable_cp( cp )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+ u_pic_format += cp;
+ } // while
+
+ if ( got_grouping_separator ) {
+ //
+ // Ibid: A grouping-separator-sign must not appear at the ... end of the
+ // decimal-digit-pattern ....
+ //
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_NoGroupSepAtEnd_3 ),
+ unicode::printable_cp( cp )
+ ),
+ ERROR_LOC( loc )
+ );
+ }
+ if ( grouping_interval_possible ) {
+ if ( !grouping_interval && grouping_separator_cp )
+ grouping_interval = pos - prev_grouping_pos;
+ pic->primary.grouping_interval = grouping_interval;
+ } else
+ pic->primary.mandatory_grouping_seps = grouping_separators;
+
+ } else {
+
+ using namespace unicode;
+ ++u;
+ switch ( cp ) {
+ case 'A':
+ pic->primary.type = picture::ALPHA;
+ break;
+ case 'a':
+ pic->primary.type = picture::alpha;
+ break;
+ case 'I':
+ pic->primary.type = picture::ROMAN;
+ break;
+ case 'i':
+ pic->primary.type = picture::roman;
+ break;
+ case 'W':
+ if ( u != u_picture_str.end() && *u == 'w' )
+ pic->primary.type = picture::Words, ++u;
else
- {
- *groupingInterval = 0;
- can_have_grouping_interval = false;
- }
- }
- else
- {
- prev_groupingChar = *pictureit;
- prev_grouping_pos = pos;
- }
- }
- else
- {
- //possibly end of primary token
- break;
- }
- pictureit++;
- pos++;
- }
- if(prev_is_grouping)
- return false;
- if(!has_digits && !is_optional)
- return false;
- *picture_size = pos;
- if(!*utf8zero)
- *utf8zero = '0';//default
- if(can_have_grouping_interval && prev_groupingChar)
- {
- if(*groupingInterval)
- {
- if(*groupingInterval != (pos - prev_grouping_pos))
- *groupingInterval = 0;
- }
- else
- {
- *groupingInterval = pos - prev_grouping_pos;
- if(prev_grouping_pos > *groupingInterval)
- *groupingInterval = 0;
- }
- }
- else
- *groupingInterval = 0;
- *groupingChar = prev_groupingChar;
- return true;
+ pic->primary.type = picture::WORDS;
+ break;
+ case 'w':
+ pic->primary.type = picture::words;
+ break;
+ case CIRCLED_DIGIT_ONE:
+ case CIRCLED_IDEOGRAPH_ONE:
+ case DIGIT_ONE_FULL_STOP:
+ case DINGBAT_CIRCLED_SANS_SERIF_DIGIT_ONE:
+ case DINGBAT_NEGATIVE_CIRCLED_DIGIT_ONE:
+ case DINGBAT_NEGATIVE_CIRCLED_SANS_SERIF_DIGIT_ONE:
+ case DOUBLE_CIRCLED_DIGIT_ONE:
+ case PARENTHESIZED_DIGIT_ONE:
+ case PARENTHESIZED_IDEOGRAPH_ONE:
+ case SUBSCRIPT_ONE:
+ case SUPERSCRIPT_ONE:
+ pic->primary.type = picture::one;
+ pic->primary.one = cp;
+ break;
+ default:
+ //
+ // Ibid: If an implementation does not support a numbering sequence
+ // represented by the given token, it must use a format token of 1.
+ //
+ pic->primary.type = picture::arabic;
+ pic->primary.format = "1";
+
+ //
+ // Ibid: If the string contains one or more semicolons then
+ // everything that precedes the last semicolon is taken as the
+ // primary format token and everything that follows is taken as the
+ // format modifier.
+ //
+ // Hence, we have to skip everything up to (but not including) the last
+ // semicolon (if any).
+ //
+ semicolon_counter = semicolons;
+ for ( ; u != u_picture_str.end(); ++u )
+ if ( *u == ';' && !--semicolon_counter )
+ break;
+ } // switch
+ }
+ *i = u.base();
}
-void FormatIntegerIterator::formatIntegerDecimalPattern(zstring::const_reverse_iterator valueit,
- zstring::const_reverse_iterator &valueit_rend,
- std::vector<unicode::code_point>::const_reverse_iterator pictureit,
- std::vector<unicode::code_point>::const_reverse_iterator &pictureit_rend,
- unsigned int picture_pos,
- unsigned int grouping_interval,
- utf8_string<zstring>::value_type grouping_char,
- utf8_string<zstring>::value_type utf8zero,
- utf8_string<zstring> &utf8_result)
-{
- if(valueit == valueit_rend)
- {
- if((pictureit == pictureit_rend) || (*pictureit == '#'))
- return;
- }
- if(grouping_interval && !((picture_pos+1)%grouping_interval))
- {
- if((pictureit != pictureit_rend) && (*pictureit == grouping_char))
- {
- pictureit++;//ignore it automatically
- if(valueit == valueit_rend)
- {
- if((pictureit == pictureit_rend) || (*pictureit == '#'))
- return;
- }
- }
- formatIntegerDecimalPattern(valueit, valueit_rend, pictureit, pictureit_rend, picture_pos+1, grouping_interval, grouping_char, utf8zero, utf8_result);
- utf8_result += (grouping_char);
+static void parse_variation( utf8_string<zstring const> const &u_picture_str,
+ utf8_string<zstring const>::const_iterator *u,
+ picture *pic, QueryLoc const &loc ) {
+ utf8_string<zstring const>::const_iterator &v = *u;
+ if ( v == u_picture_str.end() )
return;
- }
-
- if(valueit == valueit_rend)
- {
- if(unicode::is_category(*pictureit, unicode::Nd))
- {
- formatIntegerDecimalPattern(valueit, valueit_rend, pictureit+1, pictureit_rend, picture_pos+1, grouping_interval, grouping_char, utf8zero, utf8_result);
- utf8_result += (utf8zero);
- return;
- }
- else
- return;//it is grouping char
- }
- else
- {
- if(pictureit != pictureit_rend)
- {
- if(*pictureit == '#' || unicode::is_category(*pictureit, unicode::Nd))
- {
- formatIntegerDecimalPattern(valueit+1, valueit_rend, pictureit+1, pictureit_rend, picture_pos+1, grouping_interval, grouping_char, utf8zero, utf8_result);
- utf8_result += (utf8zero + *valueit - '0');
- return;
- }
- else
- {
- formatIntegerDecimalPattern(valueit, valueit_rend, pictureit+1, pictureit_rend, picture_pos+1, grouping_interval, grouping_char, utf8zero, utf8_result);
- utf8_result += (*pictureit);
- return;
- }
- }
- else
- {
- formatIntegerDecimalPattern(valueit+1, valueit_rend, pictureit, pictureit_rend, picture_pos+1, grouping_interval, grouping_char, utf8zero, utf8_result);
- utf8_result += (utf8zero + *valueit - '0');
- return;
- }
- }
-}
-
-void FormatIntegerIterator::addOrdinalEnglish(zstring &valueString,
- unsigned int valuelen,
- utf8_string<zstring> &utf8_result)
-{
- if((valuelen >= 2) && (valueString[valuelen - 2] == '1'))
- {
- utf8_result += "th";
- }
- else if(valueString[valuelen-1] == '1')
- {
- utf8_result += "st";
- }
- else if(valueString[valuelen-1] == '2')
- {
- utf8_result += "nd";
- }
- else if(valueString[valuelen-1] == '3')
- {
- utf8_result += "rd";
- }
- else
- {
- utf8_result += "th";
- }
-}
-
-bool
-FormatIntegerIterator::nextImpl(store::Item_t& result, PlanState& planState) const
-{
- store::Item_t value_item;
- store::Item_t picture_item;
- store::Item_t language_item;
- zstring resultString;
- utf8_string<zstring> utf8_result(resultString);
- zstring languageString;
- zstring pictureString;
- utf8_string<zstring> utf8_picture(pictureString);
- xs_integer valueInteger;
- bool is_neg = false;
- TypeManager* tm = theSctx->get_typemanager();
- const RootTypeManager& rtm = GENV_TYPESYSTEM;
-
- PlanIteratorState* state;
- DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
-
- if (consumeNext(value_item, theChildren[0].getp(), planState))
- {
- valueInteger = value_item->getIntegerValue();
- if(valueInteger < 0)
- {
- valueInteger = -valueInteger;
- is_neg = true;
- }
-
- consumeNext(picture_item, theChildren[1].getp(), planState);
- pictureString = picture_item->getStringValue();
- if(utf8_picture.size() == 0)
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_picture_empty)), ERROR_LOC(loc));
- }
-
- if (theChildren.size() == 3)
- {
- consumeNext(language_item, theChildren[2].getp(), planState);
- languageString = language_item->getStringValue();
-
- if(!GenericCast::isCastable(languageString, &*rtm.LANGUAGE_TYPE_ONE, tm))
- {
- throw XQUERY_EXCEPTION(err::FOFI0001,
- ERROR_PARAMS(languageString), ERROR_LOC(loc));
- }
- }
-
- try
- {
- bool is_ordinal = false;
- bool is_traditional = false;
- unsigned int picture_size = 0;
- unsigned int grouping_interval = 0;
- utf8_string<zstring>::value_type grouping_char;
- utf8_string<zstring>::value_type c0;
- utf8_string<zstring>::value_type utf8zero;
- zstring word_terminal;
- utf8_string<zstring> utf8_word_terminal(word_terminal);
- c0 = utf8_picture[0];
-
- if((c0 == 'a') || (c0 == 'A'))
- {
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- if(valueInteger > 0)
- {
- if(is_neg)
- resultString += '-';
- formatIntegerAZ(valueInteger-1, c0, resultString);
- }
- }
- else if((c0 == 'i') || (c0 == 'I'))
- {
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- if(valueInteger > 0)
- {
- if(is_neg)
- resultString += ("-");
- formatIntegerRoman(valueInteger, resultString);
- if(c0 == 'i')
- ascii::to_lower(resultString);
- }
- }
- else if((c0 == 'w') || (c0 == 'W'))
- {
- utf8_string<zstring>::value_type c1 = 0;
- bool title_case = false;
- if(utf8_picture.size() > 1)
- {
- c1 = utf8_picture[1];
- if((c0 == 'W') && (c1 == 'w'))
- {
- title_case = true;
- checkOptionalModifier(utf8_picture, 2, &is_ordinal, &is_traditional, utf8_word_terminal);
- }
- else
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- }
- //only english for now
- if(is_neg)
- resultString = "minus ";
- formatIntegerEnglish(valueInteger, is_ordinal, resultString);
- if(c0 == 'W')
- {
- if(!title_case)
- ascii::to_upper(resultString);
- else if(resultString[0] != '-')
- {
- char cup[2];
- cup[0] = ascii::to_upper(resultString[0]);
- cup[1] = 0;
- resultString.replace(0, 1, cup);
- }
- else
- {
- char cup[2];
- cup[0] = ascii::to_upper(resultString[1]);
- cup[1] = 0;
- resultString.replace(1, 1, cup);
- }
- }
- }
- else if(c0 == 0x2081) //SUBSCRIPT ONE (decimal, 0-9)
- {
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- zstring valueString = valueInteger.toString();
- zstring::iterator valueit;
- for(valueit = valueString.begin(); valueit != valueString.end(); valueit++)
- {
- if(!isdigit(*valueit))
- {
- utf8_result += (*valueit);
- }
- else
- utf8_result += (unicode::code_point)(0x2080 + *valueit - '0');
- }
- }
- else if((c0 == 0x2460) || //CIRCLED DIGIT ONE (1-20)
- (c0 == 0x2474) || //PARENTHESIZED DIGIT ONE (1-20)
- (c0 == 0x2488)) //DIGIT ONE FULL STOP (1-20)
- {
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- xs_int val_int = to_xs_int(valueInteger);
- if((val_int < 1) || (val_int > 20))
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_value_1_20), val_int), ERROR_LOC(loc));
- }
- utf8_result += (c0 + val_int - 1);
- }
- else if((c0 == 0x1369) || //ETHIOPIC DIGIT ONE (1-10)
- (c0 == 0x24F5) || //DOUBLE CIRCLED DIGIT ONE (1-10)
- (c0 == 0x2776) || //DINGBAT NEGATIVE CIRCLED DIGIT ONE (1-10)
- (c0 == 0x2780) || //DINGBAT CIRCLED SANS-SERIF DIGIT ONE (1-10)
- (c0 == 0x278A) || //DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ONE (1-10)
- (c0 == 0x3220) || //PARENTHESIZED IDEOGRAPH ONE (1-10)
- (c0 == 0x3280) || //CIRCLED IDEOGRAPH ONE (1-10)
- (c0 == 0x10107) || //AEGEAN NUMBER ONE (1-10)
- (c0 == 0x10E60) || //RUMI DIGIT ONE (1-10)
- (c0 == 0x11052) || //BRAHMI NUMBER ONE (1-10)
- (c0 == 0x1D360)) //COUNTING ROD UNIT DIGIT ONE (1-10)
- {
- checkOptionalModifier(utf8_picture, 1, &is_ordinal, &is_traditional, utf8_word_terminal);
- xs_int val_int = to_xs_int(valueInteger);
- if((val_int < 1) || (val_int > 10))
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_value_1_10), val_int), ERROR_LOC(loc));
- }
- utf8_result += (c0 + val_int - 1);
- }
- else if(isDecimalDigitPattern(utf8_picture, &picture_size, &grouping_interval, &grouping_char, &utf8zero))
- {
- checkOptionalModifier(utf8_picture, picture_size, &is_ordinal, &is_traditional, utf8_word_terminal);
-
- zstring valueString = valueInteger.toString();
- zstring::const_reverse_iterator valueit = valueString.rbegin();
- zstring::const_reverse_iterator valueit_rend = valueString.rend();
- utf8_string<zstring>::const_iterator pictureit;
- std::vector<unicode::code_point> picture_cp;
- for(pictureit = utf8_picture.begin(); pictureit != utf8_picture.end();pictureit++)
- {
- picture_cp.push_back(*pictureit);
- }
- std::vector<unicode::code_point>::const_reverse_iterator picture_cp_rbegin = picture_cp.rbegin();
- std::vector<unicode::code_point>::const_reverse_iterator picture_cp_rend = picture_cp.rend();
- picture_cp_rbegin += (utf8_picture.length() - picture_size);
- if(is_neg)
- utf8_result += ("-");
- formatIntegerDecimalPattern(valueit, valueit_rend,
- picture_cp_rbegin, picture_cp_rend,
- 0,
- grouping_interval, grouping_char,
- utf8zero,
- utf8_result);
- unsigned int valuelen = valueString.length();
- if(is_ordinal && (utf8zero == '0') && (valuelen >= 1))
- {
- addOrdinalEnglish(valueString, valuelen, utf8_result);
- }
- }
- else
- {
- throw XQUERY_EXCEPTION(err::FOFI0002, ERROR_PARAMS(ZED(format_integer_bad_picture_format), pictureString), ERROR_LOC(loc));
- }
- }
- catch (ZorbaException& e)
- {
- set_source(e, loc);
- throw;
- }
- catch (std::range_error const&re)
- {
- //"FOCA0003", "\"$1\": value too large for integer"
- throw XQUERY_EXCEPTION(err::FOCA0003, ERROR_PARAMS(re.what()), ERROR_LOC(loc));
- }
- STACK_PUSH (GENV_ITEMFACTORY->createString(result, resultString), state);
-
- }
- else
- {
- STACK_PUSH (GENV_ITEMFACTORY->createString(result, resultString), state);
- }
- STACK_END (state);
-}
+ if ( *v == '(' ) {
+ //
+ // XQuery F&O 3.0 4.6.1: The string of characters between the parentheses,
+ // if present, is used to select between other possible variations of
+ // cardinal or ordinal numbering sequences. The interpretation of this
+ // string is implementation-defined. No error occurs if the implementation
+ // does not define any interpretation for the defined string.
+ //
+ utf8_string<zstring> u_pic_co_string( pic->modifier.co_string );
+ while ( true ) {
+ if ( ++v == u_picture_str.end() )
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS( *u_picture_str.get(), ZED( CharExpected_3 ), ')' ),
+ ERROR_LOC( loc )
+ );
+ unicode::code_point const cp = *v;
+ if ( cp == ')' )
+ break;
+ u_pic_co_string += cp;
+ }
+ ++v;
+ }
+}
+
+static void parse_format_modifier( zstring const &picture_str,
+ zstring::const_iterator *i, picture *pic,
+ QueryLoc const &loc ) {
+ utf8_string<zstring const> const u_picture_str( picture_str );
+ utf8_string<zstring const>::const_iterator u( u_picture_str.current( *i ) );
+
+ unicode::code_point cp = *u++;
+ if ( cp != ';' )
+ goto bad_format_modifier;
+
+ bool got_c, got_o, got_a, got_t;
+ got_c = got_o = got_a = got_t = false;
+
+ while ( u != u_picture_str.end() ) {
+ cp = *u++;
+ switch ( cp ) {
+ case 'c':
+ if ( got_c )
+ goto dup_format_modifier;
+ if ( got_o || got_a || got_t )
+ goto bad_format_modifier_here;
+ got_c = true;
+ pic->modifier.co = picture::cardinal;
+ parse_variation( u_picture_str, &u, pic, loc );
+ break;
+ case 'o':
+ if ( got_o )
+ goto dup_format_modifier;
+ if ( got_c || got_a || got_t )
+ goto bad_format_modifier_here;
+ got_o = true;
+ pic->modifier.co = picture::ordinal;
+ parse_variation( u_picture_str, &u, pic, loc );
+ break;
+ case 'a':
+ if ( got_a )
+ goto dup_format_modifier;
+ if ( got_t )
+ goto bad_format_modifier_here;
+ got_a = true;
+ pic->modifier.at = picture::alphabetic;
+ break;
+ case 't':
+ if ( got_t )
+ goto dup_format_modifier;
+ if ( got_a )
+ goto bad_format_modifier_here;
+ got_t = true;
+ pic->modifier.at = picture::traditional;
+ break;
+ default:
+ goto bad_format_modifier;
+ } // switch
+ } // while
+ *i = u.base();
+ return;
+
+bad_format_modifier:
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_BadFormatModifier_3 ),
+ unicode::printable_cp( cp )
+ ),
+ ERROR_LOC( loc )
+ );
+
+bad_format_modifier_here:
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_BadFormatModifierHere_3 ),
+ unicode::printable_cp( cp )
+ )
+ );
+
+dup_format_modifier:
+ throw XQUERY_EXCEPTION(
+ err::FODF1310,
+ ERROR_PARAMS(
+ picture_str,
+ ZED( FODF1310_DupFormatModifier_3 ),
+ unicode::printable_cp( cp )
+ )
+ );
+}
+
+bool FormatIntegerIterator::nextImpl( store::Item_t &result,
+ PlanState &planState ) const {
+ store::Item_t item;
+ iso639_1::type lang = iso639_1::unknown;
+ iso3166_1::type country = iso3166_1::unknown;
+ bool lang_is_fallback = false;
+ picture pic;
+ zstring::const_iterator pic_i;
+ zstring picture_str, result_str;
+ xs_integer value;
+ PlanIteratorState *state;
+
+ DEFAULT_STACK_INIT( PlanIteratorState, state, planState );
+
+ if ( consumeNext( item, theChildren[0].getp(), planState ) ) {
+ value = item->getIntegerValue();
+ consumeNext( item, theChildren[1].getp(), planState );
+ item->getStringValue2( picture_str );
+
+ if ( theChildren.size() > 2 ) {
+ consumeNext( item, theChildren[2].getp(), planState );
+ if ( !locale::parse( item->getStringValue(), &lang, &country ) ||
+ !locale::is_supported( lang, country ) ) {
+ lang = iso639_1::unknown;
+ pic.lang_is_fallback = true;
+ }
+ }
+
+ if ( !lang ) {
+ //
+ // XQuery 3.0 F&O: 4.6.1: If the $lang argument is absent, or is set to
+ // an empty sequence, or is invalid, or is not a language supported by
+ // the implementation, then the number is formatted using the default
+ // language from the dynamic context.
+ //
+ planState.theLocalDynCtx->get_locale( &lang, &country );
+ if ( !locale::is_supported( lang, country ) ) {
+ //
+ // If the language defined in the dynamic context isn't supported
+ // either, try the host's language and hope for the best.
+ //
+ lang = locale::get_host_lang();
+ country = locale::get_host_country();
+ pic.lang_is_fallback = true;
+ }
+ }
+
+ pic.lang = lang;
+ pic.country = country;
+
+ pic_i = picture_str.begin();
+ parse_primary( picture_str, &pic_i, &pic, loc );
+ if ( pic_i != picture_str.end() )
+ parse_format_modifier( picture_str, &pic_i, &pic, loc );
+
+ format_integer( value, pic, &result_str );
+ }
+ STACK_PUSH( GENV_ITEMFACTORY->createString( result, result_str ), state );
+ STACK_END( state );
+}
+
+///////////////////////////////////////////////////////////////////////////////
} // namespace zorba
/* vim:set et sw=2 ts=2: */
=== modified file 'src/runtime/numerics/pregenerated/numerics.h'
--- src/runtime/numerics/pregenerated/numerics.h 2013-03-05 23:11:50 +0000
+++ src/runtime/numerics/pregenerated/numerics.h 2013-04-01 02:46:27 +0000
@@ -238,15 +238,6 @@
virtual ~FormatIntegerIterator();
-public:
- static xs_integer StringToXsInteger(const char * str);
- static void checkOptionalModifier(utf8_string<zstring> & utf8_picture, unsigned int off, bool * is_ordinal, bool * is_traditional, utf8_string<zstring> & word_terminal);
- static void formatIntegerAZ(xs_integer valueInteger, char c0, zstring & resultString);
- static void formatIntegerRoman(xs_integer valueInteger, zstring & resultString);
- static void formatIntegerEnglish(xs_integer valueInteger, bool is_ordinal, zstring & resultString);
- static bool isDecimalDigitPattern(utf8_string<zstring> & utf8_picture, unsigned int * picture_size, unsigned int * groupingInterval, utf8_string<zstring>::value_type * groupingChar, utf8_string<zstring>::value_type * utf8zero);
- static void formatIntegerDecimalPattern(zstring::const_reverse_iterator valueit, zstring::const_reverse_iterator & valueit_rend, std::vector<unicode::code_point>::const_reverse_iterator pictureit, std::vector<unicode::code_point>::const_reverse_iterator & pictureit_rend, unsigned int picture_pos, unsigned int grouping_interval, utf8_string<zstring>::value_type grouping_char, utf8_string<zstring>::value_type utf8zero, utf8_string<zstring> & utf8_result);
- static void addOrdinalEnglish(zstring & valueString, unsigned int valuelen, utf8_string<zstring> & utf8_result);
void accept(PlanIterVisitor& v) const;
bool nextImpl(store::Item_t& result, PlanState& aPlanState) const;
=== modified file 'src/runtime/spec/numerics/numerics.xml'
--- src/runtime/spec/numerics/numerics.xml 2013-03-04 21:00:58 +0000
+++ src/runtime/spec/numerics/numerics.xml 2013-04-01 02:46:27 +0000
@@ -146,9 +146,7 @@
********************************************************************************/
-->
<zorba:iterator name="FormatIntegerIterator">
-
<zorba:description author="Zorba Team">fn:format-integer</zorba:description>
-
<zorba:function>
<zorba:signature localname="format-integer" prefix="fn" version="3.0">
<zorba:param>xs:integer?</zorba:param>
@@ -162,72 +160,8 @@
<zorba:output>xs:string</zorba:output>
</zorba:signature>
</zorba:function>
-
- <zorba:method name="StringToXsInteger"
- return="static xs_integer">
- <zorba:param type="const char *" name="str"/>
- </zorba:method>
-
- <zorba:method name="checkOptionalModifier"
- return="static void">
- <zorba:param type="utf8_string<zstring> &" name="utf8_picture"/>
- <zorba:param type="unsigned int" name="off"/>
- <zorba:param type="bool *" name="is_ordinal"/>
- <zorba:param type="bool *" name="is_traditional"/>
- <zorba:param type="utf8_string<zstring> &" name="word_terminal"/>
- </zorba:method>
-
- <zorba:method name="formatIntegerAZ"
- return="static void">
- <zorba:param type="xs_integer" name="valueInteger"/>
- <zorba:param type="char" name="c0"/>
- <zorba:param type="zstring &" name="resultString"/>
- </zorba:method>
-
- <zorba:method name="formatIntegerRoman"
- return="static void">
- <zorba:param type="xs_integer" name="valueInteger"/>
- <zorba:param type="zstring &" name="resultString"/>
- </zorba:method>
-
- <zorba:method name="formatIntegerEnglish"
- return="static void">
- <zorba:param type="xs_integer" name="valueInteger"/>
- <zorba:param type="bool" name="is_ordinal"/>
- <zorba:param type="zstring &" name="resultString"/>
- </zorba:method>
-
- <zorba:method name="isDecimalDigitPattern"
- return="static bool">
- <zorba:param type="utf8_string<zstring> &" name="utf8_picture"/>
- <zorba:param type="unsigned int *" name="picture_size"/>
- <zorba:param type="unsigned int *" name="groupingInterval"/>
- <zorba:param type="utf8_string<zstring>::value_type *" name="groupingChar"/>
- <zorba:param type="utf8_string<zstring>::value_type *" name="utf8zero"/>
- </zorba:method>
-
- <zorba:method name="formatIntegerDecimalPattern"
- return="static void">
- <zorba:param type="zstring::const_reverse_iterator" name="valueit"/>
- <zorba:param type="zstring::const_reverse_iterator &" name="valueit_rend"/>
- <zorba:param type="std::vector<unicode::code_point>::const_reverse_iterator" name="pictureit"/>
- <zorba:param type="std::vector<unicode::code_point>::const_reverse_iterator &" name="pictureit_rend"/>
- <zorba:param type="unsigned int" name="picture_pos"/>
- <zorba:param type="unsigned int" name="grouping_interval"/>
- <zorba:param type="utf8_string<zstring>::value_type" name="grouping_char"/>
- <zorba:param type="utf8_string<zstring>::value_type" name="utf8zero"/>
- <zorba:param type="utf8_string<zstring> &" name="utf8_result"/>
- </zorba:method>
-
- <zorba:method name="addOrdinalEnglish"
- return="static void">
- <zorba:param type="zstring &" name="valueString"/>
- <zorba:param type="unsigned int" name="valuelen"/>
- <zorba:param type="utf8_string<zstring> &" name="utf8_result"/>
- </zorba:method>
-
</zorba:iterator>
- </zorba:iterators>
-
-
+</zorba:iterators>
+
+<!-- vim:set et sw=2 ts=2: -->
=== modified file 'src/util/ascii_util.h'
--- src/util/ascii_util.h 2013-03-21 00:54:36 +0000
+++ src/util/ascii_util.h 2013-04-01 02:46:27 +0000
@@ -22,6 +22,7 @@
#include <cctype>
#include <cstddef>
#include <cstring>
+#include <functional>
#include <iterator>
// local
@@ -589,6 +590,29 @@
);
}
+/**
+ * A unary_function to convert a (presumed) lower-case string to title-case
+ * "Like This."
+ */
+class to_title : public std::unary_function<char,char> {
+public:
+ to_title() : capitalize_( true ) { }
+
+ result_type operator()( argument_type c ) {
+ if ( is_alpha( c ) ) {
+ if ( capitalize_ ) {
+ c = to_upper( c );
+ capitalize_ = false;
+ }
+ } else if ( is_space( c ) )
+ capitalize_ = true;
+ return c;
+ };
+
+private:
+ bool capitalize_;
+};
+
////////// Replacement ////////////////////////////////////////////////////////
/**
=== modified file 'src/util/string_util.cpp'
--- src/util/string_util.cpp 2013-03-11 21:58:20 +0000
+++ src/util/string_util.cpp 2013-04-01 02:46:27 +0000
@@ -170,6 +170,141 @@
///////////////////////////////////////////////////////////////////////////////
+zstring alpha( unsigned long long n, bool capital ) {
+ if ( !n )
+ return "0";
+ zstring result;
+ char const c = capital ? 'A' : 'a';
+ while ( n ) {
+ unsigned long long const m = n - 1;
+ result.insert( (zstring::size_type)0, 1, c + m % 26 );
+ n = m / 26;
+ }
+ return result;
+}
+
+namespace english_impl {
+
+// Based on code from:
+// http://www.cprogramming.com/challenges/integer-to-english-sol.html
+
+static zstring const ones[][2] = {
+ { "", "" },
+ { "one", "first" },
+ { "two", "second" },
+ { "three", "third" },
+ { "four", "fourth" },
+ { "five", "fifth" },
+ { "six", "sixth" },
+ { "seven", "seventh" },
+ { "eight", "eighth" },
+ { "nine", "ninth" },
+ { "ten", "tenth" },
+ { "eleven", "eleventh" },
+ { "twelve", "twelfth" },
+ { "thirteen", "thirteenth" },
+ { "fourteen", "fourteenth" },
+ { "fifteen", "fifteenth" },
+ { "sixteen", "sixteenth" },
+ { "seventeen", "seventeenth" },
+ { "eighteen", "eighteenth" },
+ { "nineteen", "nineteenth" }
+};
+
+static zstring const tens[][2] = {
+ { "", "" },
+ { "", "" },
+ { "twenty", "twentieth" },
+ { "thirty", "thirtieth" },
+ { "forty", "fortieth" },
+ { "fifty", "fiftieth" },
+ { "sixty", "sixtieth" },
+ { "seventy", "seventieth" },
+ { "eighty", "eighteenth" },
+ { "ninety", "ninetieth" }
+};
+
+// Enough entries to print English for 64-bit integers.
+static zstring const big[][2] = {
+ { "", "" },
+ { "thousand", "thousandth" },
+ { "million", "millionth" },
+ { "billion", "billionth" },
+ { "trillion", "trillionth" },
+ { "quadrillion", "quadrillionth" },
+ { "quintillion", "quintillionth" }
+};
+
+inline zstring if_space( zstring const &s ) {
+ return s.empty() ? "" : ' ' + s;
+}
+
+static zstring hundreds( int64_t n, bool ordinal ) {
+ if ( n < 20 )
+ return ones[ n ][ ordinal ];
+ zstring const tmp( if_space( ones[ n % 10 ][ ordinal ] ) );
+ return tens[ n / 10 ][ ordinal && tmp.empty() ] + tmp;
+}
+
+} // namespace english_impl
+
+zstring english( int64_t n, bool ordinal ) {
+ using namespace english_impl;
+
+ if ( !n )
+ return ordinal ? "zeroth" : "zero";
+
+ bool const negative = n < 0;
+ if ( negative )
+ n = -n;
+
+ int big_count = 0;
+ bool big_ordinal = ordinal;
+ zstring r;
+
+ while ( n ) {
+ if ( int64_t const m = n % 1000 ) {
+ zstring s;
+ if ( m < 100 )
+ s = hundreds( m, ordinal );
+ else {
+ zstring const tmp( if_space( hundreds( m % 100, ordinal ) ) );
+ s = ones[ m / 100 ][0] + ' '
+ + (ordinal && tmp.empty() ? "hundredth" : "hundred") + tmp;
+ }
+ zstring const tmp( if_space( r ) );
+ r = s + if_space( big[ big_count ][ big_ordinal && tmp.empty() ] + tmp );
+ big_ordinal = false;
+ }
+ n /= 1000;
+ ++big_count;
+ ordinal = false;
+ }
+
+ if ( negative )
+ r.insert( 0, "negative " );
+ return r;
+}
+
+char const* ordinal( long long n ) {
+ n = std::abs( n );
+ switch ( n % 100 ) {
+ case 11:
+ case 12:
+ case 13:
+ break;
+ default:
+ switch ( n % 10 ) {
+ case 1: return "st";
+ case 2: return "nd";
+ case 3: return "rd";
+ }
+ }
+ return "th";
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
} // namespace ztd
} // namespace zorba
/* vim:set et sw=2 ts=2: */
=== modified file 'src/util/string_util.h'
--- src/util/string_util.h 2013-03-11 21:58:20 +0000
+++ src/util/string_util.h 2013-04-01 02:46:27 +0000
@@ -18,16 +18,20 @@
#ifndef ZORBA_STRING_UTIL_H
#define ZORBA_STRING_UTIL_H
+// standard
+#include <cctype>
#include <cstring>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
+// Zorba
#include <zorba/internal/ztd.h>
#include "ascii_util.h"
#include "cxx_util.h"
#include "stl_util.h"
+#include "zorbatypes/zstring.h"
#ifdef WIN32
// Windows annoyingly defines these as macros.
@@ -790,6 +794,37 @@
*out = s ? s : "<null>";
}
+////////// Miscellaneous ///////////////////////////////////////////////////////
+
+/**
+ * Converts an integer to an alphabetic string: 1 = A, 2 = B, ..., 26 = Z, 27 =
+ * AA, 28 = AB, .... Note that 0 remains 0.
+ *
+ * @param n The integer to convert.
+ * @param capital If \c true, capital letters are used; if \c false, lower case
+ * letters are used.
+ * @return Returns \a n as an alphabetic string or "0" if \a n is zero.
+ */
+zstring alpha( unsigned long long n, bool capital );
+
+/**
+ * Converts a signed integer to English, e.g, 42 becomes "forty two".
+ *
+ * @param n The integer to convert.
+ * @param ordinal If \c true, ordinal words ("forty second") are returned.
+ * @return Returns \a n in English.
+ */
+zstring english( int64_t n, bool ordinal = false );
+
+/**
+ * Returns the English ordinal suffix for an integer, e.g., "st" for 1, "nd"
+ * for 2, etc.
+ *
+ * @param n The integer to return the ordinal suffix for.
+ * @return Returns said suffix.
+ */
+char const* ordinal( long long n );
+
///////////////////////////////////////////////////////////////////////////////
} // namespace ztd
=== modified file 'src/util/unicode_categories.cpp'
--- src/util/unicode_categories.cpp 2013-02-28 11:15:32 +0000
+++ src/util/unicode_categories.cpp 2013-04-01 02:46:27 +0000
@@ -65885,6 +65885,22 @@
return false;
}
+bool is_grouping_separator( code_point cp ) {
+ //
+ // XQuery 3.0 F&O: 4.6.1: a grouping-separator-sign is a non-alphanumeric
+ // character, that is a character whose Unicode category is other than Nd,
+ // Nl, No, Lu, Ll, Lt, Lm or Lo.
+ //
+ return !( is_category( cp, Nd )
+ || is_category( cp, Nl )
+ || is_category( cp, No )
+ || is_category( cp, Lu )
+ || is_category( cp, Ll )
+ || is_category( cp, Lt )
+ || is_category( cp, Lm )
+ || is_category( cp, Lo ) );
+}
+
bool is_Nd( code_point cp, code_point *zero ) {
for ( code_point const *z = Nd_zeros; z < Nd_zeros_end; ++z ) {
if ( cp <= *z + 9 ) {
=== modified file 'src/util/unicode_util.h'
--- src/util/unicode_util.h 2013-03-08 00:59:55 +0000
+++ src/util/unicode_util.h 2013-04-01 02:46:27 +0000
@@ -128,6 +128,25 @@
typedef zstring string;
#endif /* ZORBA_NO_ICU */
+////////// constants //////////////////////////////////////////////////////////
+
+//
+// Various '1' digits.
+//
+code_point const CIRCLED_DIGIT_ONE = 0x2460;
+code_point const CIRCLED_IDEOGRAPH_ONE = 0x3280;
+code_point const DIGIT_ONE_FULL_STOP = 0x2488;
+code_point const DINGBAT_CIRCLED_SANS_SERIF_DIGIT_ONE = 0x2780;
+code_point const DINGBAT_NEGATIVE_CIRCLED_DIGIT_ONE = 0x2776;
+code_point const DINGBAT_NEGATIVE_CIRCLED_SANS_SERIF_DIGIT_ONE = 0x278A;
+code_point const DOUBLE_CIRCLED_DIGIT_ONE = 0x24F5;
+code_point const PARENTHESIZED_DIGIT_ONE = 0x2474;
+code_point const PARENTHESIZED_IDEOGRAPH_ONE = 0x3220;
+code_point const ROMAN_NUMERAL_ONE = 0x2160;
+code_point const SMALL_ROMAN_NUMERAL_ONE = 0x2170;
+code_point const SUBSCRIPT_ONE = 0x2081;
+code_point const SUPERSCRIPT_ONE = 0x00B9;
+
////////// code-point checking ////////////////////////////////////////////////
/**
@@ -135,18 +154,29 @@
*
* @param cp The code-point to check.
* @param c The Unicode category.
- * @return Returns \c return only if \a cp is in \a c.
+ * @return Returns \c true only if \a cp is in \a c.
*/
bool is_category( code_point cp, category c );
/**
+ * Checks whether a code-point is a grouping-separator. From XQuery 3.0 F&O
+ * 4.6.1: a grouping-separator-sign is a non-alphanumeric character, that is a
+ * character whose Unicode category is other than Nd, Nl, No, Lu, Ll, Lt, Lm or
+ * Lo.
+ *
+ * @param cp The code-point to check.
+ * @return Returns \c true only if \a c is a grouping-separator.
+ */
+bool is_grouping_separator( code_point cp );
+
+/**
* Checks whether a code-point is in the Unicode Nd (Number, Decimal Digit)
* category.
*
* @param cp The code-point to check.
* @param zero If non-null, set to the code-point of the zero at the start of
* the consecutive range of digits.
- * @return Returns \c true only if \c cp is an Nd.
+ * @return Returns \c true only if \a cp is an Nd.
*/
bool is_Nd( code_point cp, code_point *zero = nullptr );
@@ -154,7 +184,7 @@
* Checks whether the given character is invalid in an IRI.
*
* @param c The character.
- * @return Returns \c true only if the character is invalid in an IRI.
+ * @return Returns \c true only if \a c is invalid in an IRI.
* See RFC 3987.
*/
bool is_invalid_in_iri( code_point c );
@@ -163,7 +193,7 @@
* Checks whether the given character is a "iprivate".
*
* @param c The character.
- * @return Returns \c true only if the character is a "iprivate".
+ * @return Returns \c true only if \c is a "iprivate".
* See RFC 3987.
*/
bool is_iprivate( code_point c );
=== modified file 'src/zorbatypes/integer.cpp'
--- src/zorbatypes/integer.cpp 2013-03-11 15:00:50 +0000
+++ src/zorbatypes/integer.cpp 2013-04-01 02:46:27 +0000
@@ -19,6 +19,7 @@
#include <cerrno>
#include <cstdlib>
+#include <zorba/internal/unique_ptr.h>
#include "util/cxx_util.h"
#include "util/string_util.h"
@@ -365,11 +366,9 @@
TEMPLATE_DECL(T)
typename INTEGER_IMPL(T)::value_type INTEGER_IMPL(T)::ftoi( MAPM const &d ) {
MAPM const temp( d.sign() >= 0 ? d.floor() : d.ceil() );
- char *const buf = new char[ temp.exponent() + 3 ];
- temp.toIntegerString( buf );
- value_type const result( ztd::aton<value_type>( buf ) );
- delete[] buf;
- return result;
+ unique_ptr<char[]> const buf( new char[ temp.exponent() + 3 ] );
+ temp.toIntegerString( buf.get() );
+ return ztd::aton<value_type>( buf.get() );
}
TEMPLATE_DECL(T)
@@ -432,11 +431,9 @@
TEMPLATE_DECL(T)
zstring INTEGER_IMPL(T)::toString() const {
#ifdef ZORBA_WITH_BIG_INTEGER
- char *const buf = new char[ value_.exponent() + 3 ];
- value_.toIntegerString( buf );
- zstring const result( buf );
- delete[] buf;
- return result;
+ unique_ptr<char[]> const buf( new char[ value_.exponent() + 3 ] );
+ value_.toIntegerString( buf.get() );
+ return buf.get();
#else
ascii::itoa_buf_type buf;
return ascii::itoa( value_, buf );
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-03-27 17:11:24 +0000
+++ test/fots/CMakeLists.txt 2013-04-01 02:46:27 +0000
@@ -174,25 +174,10 @@
EXPECTED_FOTS_FAILURE (fn-format-dateTime format-dateTime-005 0)
EXPECTED_FOTS_FAILURE (fn-format-dateTime format-dateTime-006 0)
EXPECTED_FOTS_FAILURE (fn-format-dateTime format-dateTime-011 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-030 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-031 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-033 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-035 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-038 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-039 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-043 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-044 0)
+EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-044 1162631)
EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-049 0)
EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-050 0)
EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-052 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-055 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-056 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-057 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-058 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-059 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-060 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-063 0)
-EXPECTED_FOTS_FAILURE (fn-format-integer format-integer-064 0)
EXPECTED_FOTS_FAILURE (fn-format-number numberformat14 0)
EXPECTED_FOTS_FAILURE (fn-format-number numberformat15 0)
EXPECTED_FOTS_FAILURE (fn-format-number numberformat34 0)
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal1.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-01.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal1.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-01.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-1
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-02.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-02.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-02.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-03.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-03.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-03.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal4.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-04.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal4.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-04.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-1-2-3
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-05.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-05.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-05.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-06.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-06.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-06.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-07.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-07.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-07.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-08.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-08.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-08.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal5.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-09.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal5.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-1-09.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-001
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-1.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-1.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ2.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ2.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-2.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-Z
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-3.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-3.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-4.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-4.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ3.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ3.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-5.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-aa
\ No newline at end of file
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ4.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-6.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ4.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-6.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-az
\ No newline at end of file
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ5.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-7.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ5.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-A-7.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-ba
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-I-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-I-2.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-I-2.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-1.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-1.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-2.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-2.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-3.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-3.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-4.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-4.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-5.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-5.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-6.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-6.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-6.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-7.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-7.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Thai-7.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Wo-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Wo-1.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Wo-1.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En2.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Wwo.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En2.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-Wwo.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-Eleventh
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-1.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-1.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-3.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-3.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman2.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman2.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-4.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-III
\ No newline at end of file
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman1.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman1.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-i-5.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
--i
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-01.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-01.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-01.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-02.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-02.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-02.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-03.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-03.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-03.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-04.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-04.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-04.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-05.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-05.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-05.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-06.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-06.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-one-06.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-1.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-1.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En1.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En1.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-2.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-minus one
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-3.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-3.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En6.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En6.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-4.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-TWO HUNDRED FORTY-FOURTH
\ No newline at end of file
+true
=== renamed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En7.xml.res' => 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En7.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-w-5.xml.res 2013-04-01 02:46:27 +0000
@@ -1,2 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-one thousand one hundredth
\ No newline at end of file
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-2.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-2.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== added file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-3.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format-integer-wo-3.xml.res 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+true
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ1.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ1.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
--a
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ6.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ6.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ6.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-zz
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ7.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ7.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ7.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-aaa
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ9.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ9.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_AZ9.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En3.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En3.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-one hundred one
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En4.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En4.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-zero
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En5.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En5.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-MINUS ONE HUNDRED TWENTY-THREE BILLION FOUR HUNDRED FIFTY-SIX MILLION SEVEN HUNDRED EIGHTY-NINE THOUSAND ONE HUNDRED TWENTY-THREE CENTILLION FOUR HUNDRED FIFTY-SIX QUINDECILLION SEVEN HUNDRED EIGHTY-NINE QUATTUORDECILLION ONE HUNDRED TWENTY-THREE TREDECILLION FOUR HUNDRED FIFTY-SIX DUODECILLION SEVEN HUNDRED EIGHTY-NINE UNDECILLION ONE HUNDRED TWENTY-THREE DECILLION FOUR HUNDRED FIFTY-SIX NONILLION SEVEN HUNDRED EIGHTY-NINE OCTILLION ONE HUNDRED TWENTY-THREE SEPTILLION FOUR HUNDRED FIFTY-SIX SEXTILLION SEVEN HUNDRED EIGHTY-NINE QUINTILLION ONE HUNDRED TWENTY-THREE QUADRILLION FOUR HUNDRED FIFTY-SIX TRILLION SEVEN HUNDRED EIGHTY-NINE BILLION ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE VIGINTILLION ONE HUNDRED TWENTY-THREE NOVEMDECILLION FOUR HUNDRED FIFTY-SIX OCTODECILLION SEVEN HUNDRED EIGHTY-NINE SEPTENDECILLION ONE HUNDRED TWENTY-THREE SEXDECILLION FOUR HUNDRED FIFTY-SIX QUINDECILLION SEVEN HUNDRED EIGHTY-NINE QUATTUORDECILLION ONE HUNDRED TWENTY-THREE TREDECILLION FOUR HUNDRED FIFTY-SIX DUODECILLION SEVEN HUNDRED EIGHTY-NINE UNDECILLION ONE HUNDRED TWENTY-THREE DECILLION FOUR HUNDRED FIFTY-SIX NONILLION SEVEN HUNDRED EIGHTY-NINE OCTILLION ONE HUNDRED TWENTY-THREE SEPTILLION FOUR HUNDRED FIFTY-SIX SEXTILLION SEVEN HUNDRED EIGHTY-NINE QUINTILLION ONE HUNDRED TWENTY-THREE QUADRILLION FOUR HUNDRED FIFTY-SIX TRILLION SEVEN HUNDRED EIGHTY-NINE BILLION ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE VIGINTILLION ONE HUNDRED TWENTY-THREE NOVEMDECILLION FOUR HUNDRED FIFTY-SIX OCTODECILLION SEVEN HUNDRED EIGHTY-NINE SEPTENDECILLION ONE HUNDRED TWENTY-THREE SEXDECILLION FOUR HUNDRED FIFTY-SIX QUINDECILLION SEVEN HUNDRED EIGHTY-NINE QUATTUORDECILLION ONE HUNDRED TWENTY-THREE TREDECILLION FOUR HUNDRED FIFTY-SIX DUODECILLION SEVEN HUNDRED EIGHTY-NINE UNDECILLION ONE HUNDRED TWENTY-THREE DECILLION FOUR HUNDRED FIFTY-SIX NONILLION SEVEN HUNDRED EIGHTY-NINE OCTILLION ONE HUNDRED TWENTY-THREE SEPTILLION FOUR HUNDRED FIFTY-SIX SEXTILLION SEVEN HUNDRED EIGHTY-NINE QUINTILLION ONE HUNDRED TWENTY-THREE QUADRILLION FOUR HUNDRED FIFTY-SIX TRILLION SEVEN HUNDRED EIGHTY-NINE BILLION ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE VIGINTILLION ONE HUNDRED TWENTY-THREE NOVEMDECILLION FOUR HUNDRED FIFTY-SIX OCTODECILLION SEVEN HUNDRED EIGHTY-NINE SEPTENDECILLION ONE HUNDRED TWENTY-THREE SEXDECILLION FOUR HUNDRED FIFTY-SIX QUINDECILLION SEVEN HUNDRED EIGHTY-NINE QUATTUORDECILLION ONE HUNDRED TWENTY-THREE TREDECILLION FOUR HUNDRED FIFTY-SIX DUODECILLION SEVEN HUNDRED EIGHTY-NINE UNDECILLION ONE HUNDRED TWENTY-THREE DECILLION FOUR HUNDRED FIFTY-SIX NONILLION SEVEN HUNDRED EIGHTY-NINE OCTILLION ONE HUNDRED TWENTY-THREE SEPTILLION FOUR HUNDRED FIFTY-SIX SEXTILLION SEVEN HUNDRED EIGHTY-NINE QUINTILLION ONE HUNDRED TWENTY-THREE QUADRILLION FOUR HUNDRED FIFTY-SIX TRILLION SEVEN HUNDRED EIGHTY-NINE BILLION ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE VIGINTILLION ONE HUNDRED TWENTY-THREE NOVEMDECILLION FOUR HUNDRED FIFTY-SIX OCTODECILLION SEVEN HUNDRED EIGHTY-NINE SEPTENDECILLION ONE HUNDRED TWENTY-THREE SEXDECILLION FOUR HUNDRED FIFTY-SIX QUINDECILLION SEVEN HUNDRED EIGHTY-NINE QUATTUORDECILLION ONE HUNDRED TWENTY-THREE TREDECILLION FOUR HUNDRED FIFTY-SIX DUODECILLION SEVEN HUNDRED EIGHTY-NINE UNDECILLION ONE HUNDRED TWENTY-THREE DECILLION FOUR HUNDRED FIFTY-SIX NONILLION SEVEN HUNDRED EIGHTY-NINE OCTILLION ONE HUNDRED TWENTY-THREE SEPTILLION FOUR HUNDRED FIFTY-SIX SEXTILLION SEVEN HUNDRED EIGHTY-NINE QUINTILLION ONE HUNDRED TWENTY-THREE QUADRILLION FOUR HUNDRED FIFTY-SIX TRILLION SEVEN HUNDRED EIGHTY-NINE BILLION ONE HUNDRED TWENTY-THREE MILLION FOUR HUNDRED FIFTY-SIX THOUSAND SEVEN HUNDRED EIGHTY-NINE
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En8.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En8.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En8.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-minus second
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En9.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En9.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_En9.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-Ten trillion
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman3.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman3.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman3.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-ix
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman4.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman4.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman4.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-xxix
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman5.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman5.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman5.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-lxxxviii
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman6.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman6.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman6.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-mmxi
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman7.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman7.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman7.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-dcclxxvii
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman9.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman9.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_Roman9.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal10.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal10.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal10.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
--121st
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal2.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal2.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-1
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal6.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal6.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal6.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-0-0-1
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal7.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal7.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal7.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-1-2-34
\ No newline at end of file
=== removed file 'test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal9.xml.res'
--- test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal9.xml.res 2013-02-07 17:24:36 +0000
+++ test/rbkt/ExpQueryResults/zorba/math/format_integer/format_integer_decimal9.xml.res 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-123rd
\ No newline at end of file
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-date-MustBeOneMandatoryDigit.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-date( xs:date("2012-01-02"), "[Y#]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifier-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00x]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00oc]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00ac]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00tc]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-4.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00co]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-5.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00ao]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-6.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00to]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-7.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00ta]" )
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.spec'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FOFD1340
=== added file 'test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.xq'
--- test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/durationdatetime/FormatDateTimeFunc/format-time-Bad2ndModifierHere-8.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-time( xs:time("09:14:00-08:30"), "[Z00:00at]" )
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal1.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-01.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal1.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-01.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(1, "3")
\ No newline at end of file
+fn:format-integer( 1, "0" ) eq "1"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-02.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-02.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-02.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "1" ) eq "1"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-03.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-03.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-03.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "2" ) eq "1"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal4.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-04.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal4.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-04.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(123, "#-3")
\ No newline at end of file
+fn:format-integer( 123, "#-3" ) eq "1-2-3"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-05.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-05.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-05.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "0'000" ) eq "0'015"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-06.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-06.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-06.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1000000, "0'000" ) eq "1'000'000"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-07.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-07.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-07.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "#'##0" ) eq "15"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-08.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-1-08.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-08.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1000000, "#'##0" ) eq "1'000'000"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal5.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-1-09.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal5.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-1-09.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(1, "003")
\ No newline at end of file
+fn:format-integer( 1, "009" ) eq "001"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-A-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "A" ) eq "A"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ2.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ2.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-2.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(26, "A")
\ No newline at end of file
+fn:format-integer( 26, "A" ) eq "Z"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-A-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 0, "A" ) eq "0"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-A-4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-4.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( -1, "A" ) eq "-A"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ3.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ3.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-5.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(27, "a")
\ No newline at end of file
+fn:format-integer( 27, "A" ) eq "AA"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ4.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ4.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-6.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(52, "a")
\ No newline at end of file
+fn:format-integer( 52, "A" ) eq "AZ"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ5.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-A-7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ5.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-A-7.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(53, "a")
\ No newline at end of file
+fn:format-integer( 53, "A" ) eq "BA"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;x" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifier-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1x" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;oc" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;ac" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;tc" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-4.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;co" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-5.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;ao" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-6.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;to" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-7.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;ta" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-BadFormatModifierHere-8.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1;at" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-EmptyFormat-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, ";o" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-I-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-I-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-I-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1967, "I" ) eq "MCMLXVII"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoAdjacentGroupSep.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 12345, "0,,001" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtEnd.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 123, "1," )
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal3.spec' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtStart.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal3.spec 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtStart.spec 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-Error: http://www.w3.org/2005/xqt-errors:FOFI0002
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal3.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtStart.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal3.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoGroupSepAtStart.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(123, "-3")
\ No newline at end of file
+fn:format-integer( 123, "-1" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.spec 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.spec 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+Error: http://www.w3.org/2005/xqt-errors:FODF1310
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-NoOptDigitAfterMandatory.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "0#" )
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "๐" ) eq "๑๕"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "๑" ) eq "๑๕"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "๐'๐๐๐" ) eq "๐'๐๑๕"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-4.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-4.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1000000, "๐'๐๐๐" ) eq "๑'๐๐๐'๐๐๐"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-5.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-5.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 15, "#'##๐" ) eq "๑๕"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-6.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-6.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1000000, "#'##๐" ) eq "๑'๐๐๐'๐๐๐"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-7.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Thai-7.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "๐๐๙" ) eq "๐๐๑"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Wo-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-Wo-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Wo-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 42, "W;o", "en_US" ) eq "FORTY SECOND"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En2.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-Wwo.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En2.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-Wwo.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(11, "Wwo")
\ No newline at end of file
+fn:format-integer( 42, "Ww;o", "en_US" ) eq "Forty Second"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-i-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-i-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-i-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1967, "i" ) eq "mcmlxvii"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-i-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-i-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-i-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 0, "i" ) eq "0"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman2.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-i-4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman2.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-i-4.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(3, "Io")
\ No newline at end of file
+fn:format-integer( 3, "I;o" ) eq "III"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman1.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-i-5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman1.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-i-5.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(-1, "i")
\ No newline at end of file
+fn:format-integer( -1, "i" ) eq "-i"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-01.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-01.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-01.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "①" ) eq "①"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-02.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-02.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-02.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 20, "①" ) eq "⑳"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-03.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-03.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-03.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 21, "①" ) eq "21"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-04.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-04.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-04.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1, "㊀" ) eq "㊀"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-05.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-05.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-05.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 10, "㊀" ) eq "㊉"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-one-06.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-one-06.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-one-06.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 11, "㊀" ) eq "11"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-w-1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-w-1.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-w-1.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 42, "w", "en_US" ) eq "forty two"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En1.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-w-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En1.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-w-2.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(-1, "w")
\ No newline at end of file
+fn:format-integer( -1, "w", "en_US" ) eq "negative one"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-w-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-w-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-w-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 1967, "w", "en_US" ) eq "one thousand nine hundred sixty seven"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En6.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-w-4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En6.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-w-4.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(244, "Wo")
\ No newline at end of file
+fn:format-integer( 9223372036854775807, "w", "en_US" ) eq "nine quintillion two hundred twenty three quadrillion three hundred seventy two trillion thirty six billion eight hundred fifty four million seven hundred seventy five thousand eight hundred seven"
=== renamed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En7.xq' => 'test/rbkt/Queries/zorba/math/format_integer/format-integer-w-5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En7.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-w-5.xq 2013-04-01 02:46:27 +0000
@@ -1,1 +1,1 @@
-fn:format-integer(1100, "wo")
\ No newline at end of file
+fn:format-integer( 1100, "w;o" ) eq "one thousand one hundredth"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-2.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-2.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( 42, "w;o", "en_US" ) eq "forty second"
=== added file 'test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-3.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format-integer-wo-3.xq 2013-04-01 02:46:27 +0000
@@ -0,0 +1,1 @@
+fn:format-integer( -42, "w;o", "en_US" ) eq "negative forty second"
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ1.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ1.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ1.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-1, "ato")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ6.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ6.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer((1+26)*26, "a")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ7.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ7.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer((1+26)*26+1, "a")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.spec 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.spec 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:XPTY0004
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ8.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-1.2, "a")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ9.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ9.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_AZ9.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(0, "a")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En3.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En3.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(101, "w")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En4.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En4.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-0, "w")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.spec 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.spec 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FOAR0002
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En5.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789, "W")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En8.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En8.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En8.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-2, "wo")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_En9.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_En9.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_En9.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(10000000000000, "Ww")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman3.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman3.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman3.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(9, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman4.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman4.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman4.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(29, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman5.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman5.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman5.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(88, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman6.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman6.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(2011, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman7.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman7.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(777, "i", "it")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.spec 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.spec 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FOFI0002
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman8.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(3001, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman9.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman9.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_Roman9.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-0, "i")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal10.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal10.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal10.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(-121, "#oa")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal2.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal2.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal2.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(1, "#")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal6.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal6.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal6.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(1, "0-1-3")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal7.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal7.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal7.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(1234, "#-9-9-03")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.spec'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.spec 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.spec 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-Error: http://www.w3.org/2005/xqt-errors:FOFI0002
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal8.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(1, "3-")
\ No newline at end of file
=== removed file 'test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal9.xq'
--- test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal9.xq 2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/math/format_integer/format_integer_decimal9.xq 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-fn:format-integer(123, "#oa")
\ No newline at end of file
Follow ups
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: noreply, 2013-04-02
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-02
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-02
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Chris Hillery, 2013-04-02
-
Re: [Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Chris Hillery, 2013-04-02
-
Re: [Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Matthias Brantner, 2013-04-01
-
Re: [Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Nicolae Brinza, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-01
-
Re: [Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Zorba Build Bot, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Paul J. Lucas, 2013-04-01
-
Re: [Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Paul J. Lucas, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Paul J. Lucas, 2013-04-01
-
[Merge] lp:~zorba-coders/zorba/bug-1123163 into lp:zorba
From: Paul J. Lucas, 2013-04-01