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


Quelle  testPropCallElem.js   Sprache: JAVA

 
// vim: set ts=8 sts=4 et sw=4 tw=99:

function testUKeyUObject(a, key1, key2, key3) {
    a.a = function () { return this.d; }
    a.b = function () { return this.e; }
    a.c = function() { return this.f; }
    a.d = 20;
    a.e = "hi";
    a.f = 500;
    assertEq(a[key1](), 20);
    assertEq(a[key2](), "hi");
    assertEq(a[key3](), 500);
}

function testVKeyUObject(a, key1, key2, key3) {
    a.a = function () { return this.d; }
    a.b = function () { return this.e; }
    a.c = function() { return this.f; }
    a.d = 20;
    a.e = "hi";
    a.f = 500;
    assertEq(a["" + key1](), 20);
    assertEq(a["" + key2](), "hi");
    assertEq(a["" + key3](), 500);
}

function testKKeyUObject(a) {
    a.a = function () { return this.d; }
    a.b = function () { return this.e; }
    a.c = function() { return this.f; }
    a.d = 20;
    a.e = "hi";
    a.f = 500;
    var key1 = "a";
    var key2 = "b";
    var key3 = "c";
    assertEq(a[key1](), 20);
    assertEq(a[key2](), "hi");
    assertEq(a[key3](), 500);
}

function testUKeyVObject(key1, key2, key3) {
    a = { a: function () { return this.d; },
          b: function () { return this.e; },
          c: function () { return this.f; },
          d: 20,
          e: "hi",
          f: 500
    };
    assertEq(a[key1](), 20);
    assertEq(a[key2](), "hi");
    assertEq(a[key3](), 500);
}

function testVKeyVObject(key1, key2, key3) {
    a = { a: function () { return this.d; },
          b: function () { return this.e; },
          c: function () { return this.f; },
          d: 20,
          e: "hi",
          f: 500
    };
    assertEq(a["" + key1](), 20);
    assertEq(a["" + key2](), "hi");
    assertEq(a["" + key3](), 500);
}

function testKKeyVObject(a) {
    a = { a: function () { return this.d; },
          b: function () { return this.e; },
          c: function () { return this.f; },
          d: 20,
          e: "hi",
          f: 500
    };
    var key1 = "a";
    var key2 = "b";
    var key3 = "c";
    assertEq(a[key1](), 20);
    assertEq(a[key2](), "hi");
    assertEq(a[key3](), 500);
}

for (var i = 0; i < 5; i++) {
    testUKeyUObject({}, "a""b""c");
    testVKeyUObject({}, "a""b""c");
    testKKeyUObject({});
    testUKeyVObject("a""b""c");
    testVKeyVObject("a""b""c");
    testKKeyVObject();
}



Messung V0.5
C=92 H=97 G=94

¤ Dauer der Verarbeitung: 0.11 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge