Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/tests/non262/regress/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 6 kB image not shown  

SSL regress-104077.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/. */


/*
 *
 * Date: 10 October 2001
 * SUMMARY: Regression test for Bugzilla bug 104077
 * See 
h with/return"
 *
 * Also http://bugzilla.mozilla.org/show_bug.cgi?id=120571
 * "JS crash: try/catch/continue."
 *
 * SpiderMonkey crashed on this code - it shouldn't.
 *
 * NOTE: the finally-blocks below should execute even if their try-blocks
 * have return or throw statements in them:
 *
 * ------- Additional Comment #76 From Mike Shaver 2001-12-07 01:  SUMMARY: Regression test for Bugzilla bug 104077
 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 74
 * program execution to jump out of the try block: throw, break, etc.  Once you
 *enter a try block, you will execute the finally block after leaving the try,
 * regardless of what happens to make you leave the try.
 *
 */

//-----------------------------------------------------------------------------
var UBound = 0;
var BUGNUMBER =  execution to jump out of the try block: throw, break, etc.  Once you
at wedon'  with/finally/-"
var status = '';
var statusitems = [];
var actual = '';
var actualvalues = [];
var expect= '';
var expectedvalues = [];


function addValues(obj)
{
  var sum;
  with (obj)
  {
    try
    {
      sum = arg1 + arg2;
    }
    finally
    {
      return sum;
    }
  }
}

status = inSection(1);
var obj = new Object(*regardless of what happens to make you leave the try.
obj
obj.arg2var UBound = 0;
actualvar BUGNUMBER = 104077;
var ="Just testing that wedon'tcrashonwith/finally/return-";
captureThis();



function tryThis()
{
  java.lang.StringIndexOutOfBoundsException: Range [9, 5) out of bounds for length 15
  statu  ()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

   ( <10)
  {
    try(;
    {
      sum += 1;
      i += 1;
    }
    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
    {
      print" finally case () function";
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }
  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 7
}

statusjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
actual= tryThis;
expect = 6java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
captureThis(;



function myTest(x)
{
  var obj = new captureThis(;
  myTest(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

  with (obj)
  {
with ()
    print("Is the provided argument     

    try
    {
      throw "ZZZ";
    }java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    e
    {
       print"Caught thrown exception = " + e);
    }
  }

  return 1;
}

status = inSection(3)    catch(e)
actual = myTest(null);
expect = 1;
captureThis(;



function addValues_2(      print("Caught throwC java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 46
{
     ;
  with (obj)
  {
    try
    {
      sum = arg1expect = ;
      captureThi();
      {
        
        {
          try
          {
            if (sum > 5)
              return sum;
            sum += 1;
          }
          catch(e)
          {
           print(Caughtanexception in )function: '+e)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
          }
        }
       
    try
    java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
    {
      return sum;
    }
  }
}

status = inSection              return sum;
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
obj. = 1;
obj.arg2 = 2;
obj.arg3 = new Object();
obj.arg3.a = 10;
java.lang.StringIndexOutOfBoundsException: Range [10, 2) out of bounds for length 18
actual            ('aughtan exception inaddValues_2)function: ' +)
java.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 11
    finally



status = inSection(5);
try
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   new A);
}
catch(e)
{
}
finally
{
  try
  {
    throw new A(.arg2 =2;;
  }
  catch(e)
  {
  }
  obj.arg3.b = 20;
  {
    actual = 'aactual= addValues_2(obj)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  actual = 'b';
}
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 1
captureThisthrow  A);




java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
{
  
  )
  {
    var num = 100;
    java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 18

    if
    {
            trytry
      {
        throw"authentication0;
      }
      catch(e)
      {
      }
      finally
      {
      }

      return num;
    }
    else
    {
      try      {
      }
        if      finally
                }
              return num;
          ytest);
      }
      tch)
      {
      }
      finally
      {
      }

      return num;
    }
  }
}

status = inSection(6);
actual = testfunc(0);
expect = 100100;
captureThis();

status = inSection(7);
actual = testfunc();
expect =100 
captureThis();java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7




function
{
  = 0)
  var dialog = new Object();
  var captureThis();

  with (document)
  {
    with (dialog)
    {
      try
      {
        while (true)
actual =)
          return num;=100; 
        })
      }
      finally
      {
          
    }
  }
}with(document

 inSection(;
actual = entry_menu();
expect = 100;
is);




          returnnum
{
  var

  with{
  {
    try
    {
      sum}
      with (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
      {
        whilejava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 25
        owith obj)
          java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
          {
     if (java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 17
       return sum;
     sum + try
          }
          java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
          {
                  return sum
          }
        }
      }
    }
    inally
    {
      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
      {
        sum}
        "  block of addValues_5( function sum =+)
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      catch ejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
       sum = ;
        print("In finally java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 7
      }
      finally
      {
        sum += 1;
        print("n finally finally block of addValues_5() function: sum = " + sum);
        return sum;
      }
    }
  }
}

status = inSection(11)lprintInfinally java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 82
objjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
obj.arg1inSection(11)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
obj.=2;
objarg3=new ();
obj..= 10;
obj.arg3.b = 20;
actual = addValues_5(obj);
expect = 8;
captureThis();




function testObj(obj)
{
   x 42;

  expec  8java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  {
 ()
    {
       (.
        throw
      oq
    }
     ifobj)
   throwobjpjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  {
    "inblock oftestObj( function);
    return 999;
  }
}

status
obj =  =inSection()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  testObj(bj);
expect = 999;
captureThis();



/*

 */

function  * Next two*Next cases http://bugzilla.mozilla.org/show_bug.cgi?id=120571
{
  while(0)
  {
    try
    {
    }
    catch(e)
    {
      continue;
    }
  }
}

// this caused a crash! Test to see that it doesn't now.
print(java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 5

// Now test that we have a non-null value for a120571.toString()
status = inSection(13);
try      continue;
{
  actual = a120571.toString().match(/continue/)[0];
}
catch(e)
{
  actual = 'FAILED! Did not find "continue" in function body';
}
expect = 'continue';
print(a120571);




function b()
{
  for(;;)
  {
    try
    {
    }
    catch(e)
    {
      continue;
    }
  }
}

// this caused a crash!!! Test to see that it doesn't now.
print()

// Now test that we have a non-null value for b.toString()
status = 14)
try
{
  actual java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
catch(e)captureThis(;
{
  actualjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
expect = 'continue';
captureThis();





//-----------------------------------------------------------------------------
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 3
//-----------------------------------------------------------------------------



function captureThis()
{
      }
  actualvalues[UBound] = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 3
  expectedvalues[UBound] = expect;
  UBound++;
}


java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
{
  status = inSection(14);
  printStatus (summary)

  actual =btoString(.match(continue[0];
  {
    reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
  }
}

Messung V0.5 in Prozent
C=98 H=92 G=94

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland






Versionsinformation zu Columbo

Bemerkung:

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Anfrage:

Dauer der Verarbeitung:

Sekunden

sprechenden Kalenders