Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_pluralForm-irish.js

  Sprache: JAVA
 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


"use strict";

/**
 * This unit test makes sure the plural form for Irish Gaelic is working.
 */


const { PluralForm } = require("resource://devtools/shared/plural-form.js");

function run_test() {
  const origAvLocales = Services.locale.availableLocales;
  registerCleanupFunction(() => {
    Services.locale.availableLocales = origAvLocales;
  });

  Services.locale.availableLocales = ["ga-IE""en-US"];
  Services.locale.requestedLocales = ["ga-IE"];
  PluralForm.init();

  // Irish has 5 plural forms
  Assert.equal(5, PluralForm.numForms());

  // I don't really know Irish, so I'll stick in some dummy text
  const words = "is 1;is 2;is 3-6;is 7-10;everything else";

  const test = function (text, low, high) {
    for (let num = low; num <= high; num++) {
      Assert.equal(text, PluralForm.get(num, words));
    }
  };

  // Make sure for good inputs, things work as expected
  test("everything else"00);
  test("is 1"11);
  test("is 2"22);
  test("is 3-6"36);
  test("is 7-10"710);
  test("everything else"11200);
}

Messung V0.5 in Prozent
C=94 H=93 G=93

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002