Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/tests/non262/Tuple/of/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  of.js   Sprache: JAVA

 
// |reftest| skip-if(!this.hasOwnProperty("Tuple"))
/*
8.2.2.3 Tuple.of ( ...items )
The of method takes any number of arguments, and performs the following steps:

1. Let items be the List of arguments passed to this function.
2. For each element e of items,
a. If Type(e) is Object, throw a TypeError exception.
3. Let tuple be a new Tuple value whose [[Sequence]] is items.
4. Return tuple.
*/


assertEq(Tuple.of(), #[]);
assertEq(Tuple.of(undefined), #[undefined]);
assertEq(Tuple.of(null), #[null]);
assertEq(Tuple.of(1), #[1]);
assertEq(Tuple.of(1, 2), #[1,2]);
assertEq(Tuple.of(true, 5, "monkeys", #[3, 4]), #[true, 5, "monkeys", #[3, 4]]);
assertEq(Tuple.of(undefined, falsenull, undefined), #[undefined, falsenull, undefined]);

/* Step 2a. */
assertThrowsInstanceOf(() => Tuple.of([1, 2, 3]), TypeError,
                       "Tuple can't contain Object");
assertThrowsInstanceOf(() => Tuple.of([]), TypeError,
                       "Tuple can't contain Object");
assertThrowsInstanceOf(() => Tuple.of(new Object(), [1, 2, 3], new String("a")), TypeError,
                       "Tuple can't contain Object");

reportCompare(0, 0);

Messung V0.5
C=94 H=99 G=96

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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.