Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/toolkit/components/mozintl/test/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Impressum test_mozintlhelper.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


function run_test() {
  const miHelper = Cc["@mozilla.org/mozintlhelper;1"].getService(
    Ci.mozIMozIntlHelper
  );

  test_this_global(miHelper);
  test_cross_global(miHelper);
  test_methods_presence(miHelper);

  ok(true);
}

function test_this_global(miHelper) {
  let x = {};

  miHelper.addGetCalendarInfo(x);
  equal(x.getCalendarInfo instanceof Functiontrue);
  equal(x.getCalendarInfo() instanceof Object, true);
}

function test_cross_global(miHelper) {
  var global = new Cu.Sandbox("https://example.com/");
  var x = global.Object();

  miHelper.addGetCalendarInfo(x);
  var waivedX = Cu.waiveXrays(x);
  equal(waivedX.getCalendarInfo instanceof Functionfalse);
  equal(
    waivedX.getCalendarInfo instanceof Cu.waiveXrays(global.Function),
    true
  );
  equal(waivedX.getCalendarInfo() instanceof Object, false);
  equal(
    waivedX.getCalendarInfo() instanceof Cu.waiveXrays(global.Object),
    true
  );
}

function test_methods_presence(miHelper) {
  equal(miHelper.addGetCalendarInfo instanceof Functiontrue);
  equal(miHelper.addDateTimeFormatConstructor instanceof Functiontrue);
  equal(miHelper.addDisplayNamesConstructor instanceof Functiontrue);

  let x = {};

  miHelper.addGetCalendarInfo(x);
  equal(x.getCalendarInfo instanceof Functiontrue);

  miHelper.addDateTimeFormatConstructor(x);
  equal(x.DateTimeFormat instanceof Functiontrue);

  miHelper.addDisplayNamesConstructor(x);
  equal(x.DisplayNames instanceof Functiontrue);
}

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

¤ 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.0.4Bemerkung:  (vorverarbeitet am  2026-06-06) ¤

*Bot Zugriff






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.