Permalink
Browse files

Move Benchmark.js and Jasmine to tests/vendor/, and add their README …

…and LICENSE files.
  • Loading branch information...
slevithan committed Aug 21, 2012
1 parent 13d2562 commit 22a90c0e5001806f8aa7fff8a0db049d9a2e2bd9
View
@@ -5,9 +5,9 @@
<title>XRegExp Specs</title>
<!-- Jasmine -->
- <link href="lib/jasmine.css" rel="stylesheet">
- <script src="lib/jasmine.js"></script>
- <script src="lib/jasmine-html.js"></script>
+ <link href="vendor/jasmine/jasmine.css" rel="stylesheet">
+ <script src="vendor/jasmine/jasmine.js"></script>
+ <script src="vendor/jasmine/jasmine-html.js"></script>
<!-- XRegExp -->
<script src="../src/xregexp.js"></script>
View
@@ -28,7 +28,7 @@
<script src="../../src/addons/unicode/unicode-properties.js"></script>
<script src="../../src/addons/unicode/unicode-scripts.js"></script>
- <script src="lib/benchmark.js"></script>
+ <script src="../vendor/benchmark.js/benchmark.js"></script>
<script src="perf.js"></script>
<script>
@@ -46,7 +46,7 @@
// No-op
}
if (measured !== 1 && !(perf && (perf.now || perf.webkitNow))) {
- document.write('<applet code="nano" archive="lib/nano.jar"></applet>');
+ document.write('<applet code="nano" archive="../vendor/benchmark.js/nano.jar"></applet>');
}
}());
@@ -0,0 +1,22 @@
+Copyright 2010-2012 Mathias Bynens <http://mathiasbynens.be/>
+Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
+Modified by John-David Dalton <http://allyoucanleet.com/>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,135 @@
+# Benchmark.js <sup>v1.0.0</sup>
+
+A [robust](http://calendar.perfplanet.com/2010/bulletproof-javascript-benchmarks/ "Bulletproof JavaScript benchmarks") benchmarking library that works on nearly all JavaScript platforms<sup><a name="fnref1" href="#fn1">1</a></sup>, supports high-resolution timers, and returns statistically significant results. As seen on [jsPerf](http://jsperf.com/).
+
+## Download
+
+ * [Development source](https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js)
+
+## Dive in
+
+We’ve got [API docs](http://benchmarkjs.com/docs) and [unit tests](http://benchmarkjs.com/tests).
+
+For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/benchmark.js/wiki/Roadmap).
+
+## Support
+
+Benchmark.js has been tested in at least Adobe AIR 3.1, Chrome 5-21, Firefox 1.5-13, IE 6-9, Opera 9.25-12.01, Safari 3-6, Node.js 0.8.7, Narwhal 0.3.2, RingoJS 0.8, and Rhino 1.7RC5.
+
+## Installation and usage
+
+In a browser or Adobe AIR:
+
+```html
+<script src="benchmark.js"></script>
+```
+
+Optionally, expose Java’s nanosecond timer by adding the `nano` applet to the `<body>`:
+
+```html
+<applet code="nano" archive="nano.jar"></applet>
+```
+
+Or enable Chrome’s microsecond timer by using the [command line switch](http://peter.sh/experiments/chromium-command-line-switches/#enable-benchmarking):
+
+ --enable-benchmarking
+
+Via [npm](http://npmjs.org/):
+
+```bash
+npm install benchmark
+```
+
+In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/):
+
+```js
+var Benchmark = require('benchmark');
+```
+
+Optionally, use the [microtime module](https://github.com/wadey/node-microtime) by Wade Simmons:
+
+```bash
+npm install microtime
+```
+
+In [RingoJS v0.7.0-](http://ringojs.org/):
+
+```js
+var Benchmark = require('benchmark').Benchmark;
+```
+
+In [Rhino](http://www.mozilla.org/rhino/):
+
+```js
+load('benchmark.js');
+```
+
+In an AMD loader like [RequireJS](http://requirejs.org/):
+
+```js
+require({
+ 'paths': {
+ 'benchmark': 'path/to/benchmark'
+ }
+},
+['benchmark'], function(Benchmark) {
+ console.log(Benchmark.version);
+});
+
+// or with platform.js
+// https://github.com/bestiejs/platform.js
+require({
+ 'paths': {
+ 'benchmark': 'path/to/benchmark',
+ 'platform': 'path/to/platform'
+ }
+},
+['benchmark', 'platform'], function(Benchmark, platform) {
+ Benchmark.platform = platform;
+ console.log(Benchmark.platform.name);
+});
+```
+
+Usage example:
+
+```js
+var suite = new Benchmark.Suite;
+
+// add tests
+suite.add('RegExp#test', function() {
+ /o/.test('Hello World!');
+})
+.add('String#indexOf', function() {
+ 'Hello World!'.indexOf('o') > -1;
+})
+// add listeners
+.on('cycle', function(event) {
+ console.log(String(event.target));
+})
+.on('complete', function() {
+ console.log('Fastest is ' + this.filter('fastest').pluck('name'));
+})
+// run async
+.run({ 'async': true });
+
+// logs:
+// > RegExp#test x 4,161,532 +-0.99% (59 cycles)
+// > String#indexOf x 6,139,623 +-1.00% (131 cycles)
+// > Fastest is String#indexOf
+```
+
+## BestieJS
+
+Benchmark.js is part of the BestieJS *"Best in Class"* module collection. This means we promote solid browser/environment support, ES5 precedents, unit testing, and plenty of documentation.
+
+## Authors
+
+* [Mathias Bynens](http://mathiasbynens.be/)
+ [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter")
+* [John-David Dalton](http://allyoucanleet.com/)
+ [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
+
+## Contributors
+
+* [Kit Cambridge](http://kitcambridge.github.com/)
+ [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter")
File renamed without changes.
@@ -0,0 +1,20 @@
+Copyright (c) 2008-2011 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,24 @@
+<a name="README">[Jasmine](http://pivotal.github.com/jasmine/)</a>
+=======
+**A JavaScript Testing Framework**
+
+Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, [Node.js](http://nodejs.org) projects, or anywhere that JavaScript can run.
+
+Documentation & guides live here: [http://pivotal.github.com/jasmine/](http://pivotal.github.com/jasmine/)
+
+
+## Support
+
+* Search past discussions: [http://groups.google.com/group/jasmine-js](http://groups.google.com/group/jasmine-js)
+* Send an email to the list: [jasmine-js@googlegroups.com](jasmine-js@googlegroups.com)
+* View the project backlog at Pivotal Tracker: [http://www.pivotaltracker.com/projects/10606](http://www.pivotaltracker.com/projects/10606)
+* Follow us on Twitter: [@JasmineBDD](http://twitter.com/JasmineBDD)
+
+
+## Maintainers
+
+* [Davis W. Frank](mailto:dwfrank@pivotallabs.com), Pivotal Labs
+* [Rajan Agaskar](mailto:rajan@pivotallabs.com), Pivotal Labs
+* [Christian Williams](mailto:antixian666@gmail.com), Square
+
+Copyright (c) 2008-2012 Pivotal Labs. This software is licensed under the MIT License.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 22a90c0

Please sign in to comment.