Permalink
Browse files

test implimented ECMAScript 5 functions

  • Loading branch information...
1 parent 4c97523 commit 7cafb54c70a2ffe011212773d90d45afe0c2630d @clottes committed Feb 6, 2013
Showing with 132 additions and 0 deletions.
  1. +74 −0 test/index_clear_natives.html
  2. +58 −0 test/index_fake_natives.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Underscore Test Suite (w/ NO (cleared) native functions)</title>
+ <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">
+ <script src="vendor/jquery.js"></script>
+ <script src="vendor/qunit.js"></script>
+ <script src="vendor/jslitmus.js"></script>
+ <script src="../underscore.js"></script>
+ <script>
+ Array.prototype.forEach = undefined;
+ Array.prototype.map = undefined;
+ Array.prototype.reduce = undefined;
+ Array.prototype.reduceRight = undefined;
+ Array.prototype.filter = undefined;
+ Array.prototype.every = undefined;
+ Array.prototype.some = undefined;
+ Array.prototype.indexOf = undefined;
+ Array.prototype.lastIndexOf = undefined;
+ Array.isArray = undefined;
+ Object.keys = undefined;
+ Function.prototype.bind = undefined;
+ </script>
+ <script src="../underscore.js"></script>
+ <script>
+ Array.prototype.forEach = undefined;
+ Array.prototype.map = undefined;
+ Array.prototype.reduce = undefined;
+ Array.prototype.reduceRight = undefined;
+ Array.prototype.filter = undefined;
+ Array.prototype.every = undefined;
+ Array.prototype.some = undefined;
+ Array.prototype.indexOf = undefined;
+ Array.prototype.lastIndexOf = undefined;
+ Array.isArray = undefined;
+ Object.keys = undefined;
+ //Function.prototype.bind = undefined;
+ // leave in bind
+ </script>
+
+ <script src="collections.js"></script>
+ <script src="arrays.js"></script>
+ <script src="functions.js"></script>
+ <script src="objects.js"></script>
+ <script src="utility.js"></script>
+ <script src="chaining.js"></script>
+ <script src="speed.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">
+ <div id="map-test">
+ <div id="id1"></div>
+ <div id="id2"></div>
+ </div>
+ </div>
+ <br>
+ <h1 class="qunit-header">Underscore Speed Suite</h1>
+ <p>
+ A representative sample of the functions are benchmarked here, to provide
+ a sense of how fast they might run in different browsers.
+ Each iteration runs on an array of 1000 elements.<br /><br />
+ For example, the 'intersection' test measures the number of times you can
+ find the intersection of two thousand-element arrays in one second.
+ </p>
+ <br>
+ <script type="text/html" id="template">
+ <%
+ // a comment
+ if (data) { data += 12345; }; %>
+ <li><%= data %></li>
+ </script>
+</body>
+</html>
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Underscore Test Suite</title>
+ <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">
+ <script src="vendor/jquery.js"></script>
+ <script src="vendor/qunit.js"></script>
+ <script src="vendor/jslitmus.js"></script>
+ <script>
+ Array.prototype.forEach = undefined;
+ Array.prototype.map = undefined;
+ Array.prototype.reduce = undefined;
+ Array.prototype.reduceRight = undefined;
+ Array.prototype.filter = undefined;
+ Array.prototype.every = undefined;
+ Array.prototype.some = undefined;
+ Array.prototype.indexOf = undefined;
+ Array.prototype.lastIndexOf = undefined;
+ Array.isArray = undefined;
+ Object.keys = undefined;
+ Function.prototype.bind = undefined;
+ </script>
+ <script src="../underscore.js"></script>
+
+ <script src="collections.js"></script>
+ <script src="arrays.js"></script>
+ <script src="functions.js"></script>
+ <script src="objects.js"></script>
+ <script src="utility.js"></script>
+ <script src="chaining.js"></script>
+ <script src="speed.js"></script>
+</head>
+<body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture">
+ <div id="map-test">
+ <div id="id1"></div>
+ <div id="id2"></div>
+ </div>
+ </div>
+ <br>
+ <h1 class="qunit-header">Underscore Speed Suite</h1>
+ <p>
+ A representative sample of the functions are benchmarked here, to provide
+ a sense of how fast they might run in different browsers.
+ Each iteration runs on an array of 1000 elements.<br /><br />
+ For example, the 'intersection' test measures the number of times you can
+ find the intersection of two thousand-element arrays in one second.
+ </p>
+ <br>
+ <script type="text/html" id="template">
+ <%
+ // a comment
+ if (data) { data += 12345; }; %>
+ <li><%= data %></li>
+ </script>
+</body>
+</html>

0 comments on commit 7cafb54

Please sign in to comment.