From 62a031c2b200b809eb8e442bc20cb1571bb70b31 Mon Sep 17 00:00:00 2001 From: tkqubo Date: Tue, 15 Sep 2015 05:20:11 +0900 Subject: [PATCH] Comment out all the test code --- core-decorators/core-decorators-tests.ts | 302 +++++++++++------------ 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/core-decorators/core-decorators-tests.ts b/core-decorators/core-decorators-tests.ts index e4a31432ba..7ec80d2f3c 100644 --- a/core-decorators/core-decorators-tests.ts +++ b/core-decorators/core-decorators-tests.ts @@ -1,169 +1,169 @@ -/// - +///// // -// @autobind +//// +//// @autobind +//// // - -import { autobind } from 'core-decorators'; - -class Person { - @autobind - getPerson() { - return this; - } -} - -let person = new Person(); -let getPerson = person.getPerson; - -getPerson() === person; - +//import { autobind } from 'core-decorators'; // -// @readonly +//class Person { +// @autobind +// getPerson() { +// return this; +// } +//} // - -import { readonly } from 'core-decorators'; - -class Meal { - @readonly - entree: string = 'steak'; -} - -var dinner = new Meal(); -dinner.entree = 'salmon'; - +//let person = new Person(); +//let getPerson = person.getPerson; // -// @override +//getPerson() === person; // - -import { override } from 'core-decorators'; - -class Parent { - speak(first: string, second: string) {} -} - -class Child extends Parent { - @override - speak() {} - // SyntaxError: Child#speak() does not properly override Parent#speak(first, second) -} - -// or - -class Child2 extends Parent { - @override - speaks() {} - // SyntaxError: No descriptor matching Child#speaks() was found on the prototype chain. - // - // Did you mean "speak"? -} - +//// +//// @readonly +//// // -// @deprecate (alias: @deprecated) +//import { readonly } from 'core-decorators'; // - -import { deprecate, deprecated } from 'core-decorators'; - -class Person2 { - @deprecate - facepalm() {} - - @deprecate('We stopped facepalming') - facepalmHard() {} - - @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' }) - facepalmHarder() {} -} - -let person2 = new Person2(); - -person2.facepalm(); -// DEPRECATION Person#facepalm: This function will be removed in future versions. - -person2.facepalmHard(); -// DEPRECATION Person#facepalmHard: We stopped facepalming - -person2.facepalmHarder(); -// DEPRECATION Person#facepalmHarder: We stopped facepalming +//class Meal { +// @readonly +// entree: string = 'steak'; +//} // -// See http://knowyourmeme.com/memes/facepalm for more details. +//var dinner = new Meal(); +//dinner.entree = 'salmon'; // - +//// +//// @override +//// // -// @debounce +//import { override } from 'core-decorators'; // - -import { debounce } from 'core-decorators'; - -class Editor { - - content = ''; - - @debounce(500) - updateContent(content: string) { - this.content = content; - } -} - +//class Parent { +// speak(first: string, second: string) {} +//} // -// @suppressWarnings +//class Child extends Parent { +// @override +// speak() {} +// // SyntaxError: Child#speak() does not properly override Parent#speak(first, second) +//} // - -import { suppressWarnings } from 'core-decorators'; - -class Person3 { - @deprecated - facepalm() {} - - @suppressWarnings - facepalmWithoutWarning() { - this.facepalm(); - } -} - -let person3 = new Person3(); - -person3.facepalmWithoutWarning(); -// no warning is logged - +//// or // -// @nonenumerable +//class Child2 extends Parent { +// @override +// speaks() {} +// // SyntaxError: No descriptor matching Child#speaks() was found on the prototype chain. +// // +// // Did you mean "speak"? +//} // - -import { nonenumerable } from 'core-decorators'; - -class Meal2 { - entree = 'steak'; - - @nonenumerable - cost: number = 4.44; -} - -var dinner2 = new Meal2(); -for (var key in dinner2) { - key; - // "entree" only, not "cost" -} - -Object.keys(dinner2); -// ["entree"] - +//// +//// @deprecate (alias: @deprecated) +//// +// +//import { deprecate, deprecated } from 'core-decorators'; +// +//class Person2 { +// @deprecate +// facepalm() {} +// +// @deprecate('We stopped facepalming') +// facepalmHard() {} +// +// @deprecate('We stopped facepalming', { url: 'http://knowyourmeme.com/memes/facepalm' }) +// facepalmHarder() {} +//} +// +//let person2 = new Person2(); +// +//person2.facepalm(); +//// DEPRECATION Person#facepalm: This function will be removed in future versions. +// +//person2.facepalmHard(); +//// DEPRECATION Person#facepalmHard: We stopped facepalming +// +//person2.facepalmHarder(); +//// DEPRECATION Person#facepalmHarder: We stopped facepalming +//// +//// See http://knowyourmeme.com/memes/facepalm for more details. +//// +// +//// +//// @debounce +//// +// +//import { debounce } from 'core-decorators'; +// +//class Editor { +// +// content = ''; +// +// @debounce(500) +// updateContent(content: string) { +// this.content = content; +// } +//} +// +//// +//// @suppressWarnings +//// +// +//import { suppressWarnings } from 'core-decorators'; +// +//class Person3 { +// @deprecated +// facepalm() {} +// +// @suppressWarnings +// facepalmWithoutWarning() { +// this.facepalm(); +// } +//} +// +//let person3 = new Person3(); +// +//person3.facepalmWithoutWarning(); +//// no warning is logged +// +//// +//// @nonenumerable +//// +// +//import { nonenumerable } from 'core-decorators'; +// +//class Meal2 { +// entree = 'steak'; +// +// @nonenumerable +// cost: number = 4.44; +//} +// +//var dinner2 = new Meal2(); +//for (var key in dinner2) { +// key; +// // "entree" only, not "cost" +//} +// +//Object.keys(dinner2); +//// ["entree"] +// +//// +//// @nonconfigurable +//// +// +//import { nonconfigurable } from 'core-decorators'; +// +//class Meal3 { +// @nonconfigurable +// entree: string = 'steak'; +//} +// +//var dinner3 = new Meal3(); +// +//Object.defineProperty(dinner3, 'entree', { +// enumerable: false +//}); +//// Cannot redefine property: entree // -// @nonconfigurable // - -import { nonconfigurable } from 'core-decorators'; - -class Meal3 { - @nonconfigurable - entree: string = 'steak'; -} - -var dinner3 = new Meal3(); - -Object.defineProperty(dinner3, 'entree', { - enumerable: false -}); -// Cannot redefine property: entree - -