add recusion and infinite loop tests
This commit is contained in:
parent
ce0fe06349
commit
7f7ff93745
|
@ -0,0 +1,23 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Infinite loop</title>
|
||||
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Infinite loop</h1>
|
||||
<p>Before</p>
|
||||
<script>
|
||||
|
||||
function bar(x) { return (x/2) + 1; }
|
||||
|
||||
n=1;
|
||||
while (n < 3) {
|
||||
n = bar(n);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
<p>Afterwards</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Infinite recursion</title>
|
||||
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Infinite recursion</h1>
|
||||
<p>Before</p>
|
||||
<script>
|
||||
|
||||
function it_keeps_going_and_going_and_going(i) {
|
||||
|
||||
return it_keeps_going_and_going_and_going(i+1);
|
||||
}
|
||||
|
||||
it_keeps_going_and_going_and_going(1)
|
||||
</script>
|
||||
</script>
|
||||
<p>Afterwards</p>
|
||||
</body>
|
||||
</html>
|
|
@ -6,6 +6,12 @@
|
|||
<body>
|
||||
<h1>JavaScript Tests</h1>
|
||||
|
||||
<h2>Core</h2>
|
||||
<ul>
|
||||
<li><a href="core.recursion.html">Infinite Recursion</a></li>
|
||||
<li><a href="core.infinite.html">Infinite loop</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Window</h2>
|
||||
<ul>
|
||||
|
|
Loading…
Reference in New Issue