Index: test/intl/collator/sr-sort.js |
diff --git a/src/extensions/i18n/i18n-extension.h b/test/intl/collator/sr-sort.js |
similarity index 69% |
copy from src/extensions/i18n/i18n-extension.h |
copy to test/intl/collator/sr-sort.js |
index 050c336a67a21fd6cb32892e14215cac11971111..d095d63babf226af35143d5b16042a3850417184 100644 |
--- a/src/extensions/i18n/i18n-extension.h |
+++ b/test/intl/collator/sr-sort.js |
@@ -26,26 +26,22 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// limitations under the License. |
-#ifndef V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |
-#define V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |
+// Sort plain Serbian text using defaults. |
-#include "v8.h" |
+var strings = ['новине', 'ограда', 'жирафа', 'Никола', 'Андрија', |
+ 'Стара Планина', 'џак', 'алав', 'ћук', 'чука']; |
-namespace v8_i18n { |
+var collator = Intl.Collator(['sr']); |
+var result = strings.sort(collator.compare); |
-class Extension : public v8::Extension { |
- public: |
- Extension(); |
+assertEquals('алав', result[0]); |
+assertEquals('Андрија', result[1]); |
+assertEquals('жирафа', result[2]); |
+assertEquals('Никола', result[3]); |
+assertEquals('новине', result[4]); |
+assertEquals('ограда', result[5]); |
+assertEquals('Стара Планина', result[6]); |
+assertEquals('ћук', result[7]); |
+assertEquals('чука', result[8]); |
+assertEquals('џак', result[9]); |
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
- v8::Handle<v8::String> name); |
- |
- static void Register(); |
- |
- private: |
- static Extension* extension_; |
-}; |
- |
-} // namespace v8_i18n |
- |
-#endif // V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |