Merge branch 'master' into load-subdirs

This commit is contained in:
dloverin committed 2013-05-13 08:29:31 -04:00
commit 47de2cb19c
27 files changed
+855 -245

No files matched your search

@@ -47,3 +47,99 @@ var x = A1;
var arr = [];
arr["my-key"] = 1;
arr["for"] = 10;
function MClass() {
"use strict";
}
MClass.prototype.calc = function (a4, b4) {
"use strict";
return a4 + b4;
};
var ins1 = new MClass();
ins1.calc(10, 10);
var Person = function (name) {
"use strict";
this.name = name;
};
Person.prototype.getName = function () {
"use strict";
return this.name;
};
var Customer = function (name) {
"use strict";
this.name = name;
};
Customer.prototype = new Person();
var myCustomer = new Customer('Dream Inc.');
myCustomer.getName();
Customer.prototype.setAmountDue = function (amountDue) {
"use strict";
this.amountDue = amountDue;
};
Customer.prototype.getAmountDue = function () {
"use strict";
return this.amountDue;
};
function testInnerFunc() {
"use strict";
var t = "test";
function innerFunc(arg) {
return {t: function () {return arg; }};
}
var t2 = innerFunc("test").t().toLocaleLowerCase();
}
/**
* @param {boolean} a
* @param {Date} b
*/
function funTypeAn1(a, b) {
"use strict";
return {x: a, y: b};
}
/**
* @param {function(): number} f
*/
function funFuncArg(f) {
"use strict";
return f();
}
function testRef1() {
"use strict";
return 100;
}
funFuncArg(testRef1); //also test return type
/**
* @param {function(string,number): string} f
*/
function funFunc2Arg(f) {
"use strict";
var s = "test";
return f(s, 10);
}
function testRef2(s, n) {
"use strict";
return s + n;
}
funFunc2Arg(testRef2);
var funArr = [];
funArr.index1 = testRef1;
funArr.index2 = testRef2;