]> gerrit.simantics Code Review - simantics/district.git/blob - shim.js
e0e123b324e11530fbb898bf63a3895503610bc9
[simantics/district.git] / shim.js
1 // Inspired and in some parts copied from:
2 // http://closure-library.googlecode.com/svn/trunk/closure/goog
3 // /string/string_test.html
4
5 'use strict';
6
7 module.exports = function (t, a) {
8         a(t.call('abc', ''), true, "Empty needle");
9         a(t.call('abcd', 'ab'), true, "Starts with needle");
10         a(t.call('abcd', 'abcd'), true, "Needle equals haystack");
11         a(t.call('abcd', 'bcde', 1), false, "Needle larger than haystack");
12         a(!t.call('abcd', 'cd'), true, "Doesn't start with needle");
13         a(t.call('abcd', 'bc', 1), true, "Position");
14 };