Add test in case of remove /// on node that will not be emitted when removeComment is true

This commit is contained in:
Yui T
2015-08-20 15:02:46 -07:00
parent 3f66968776
commit 8eff741961
7 changed files with 44 additions and 46 deletions

View File

@@ -1,19 +0,0 @@
//// [tests/cases/compiler/doNotEmitTripleSlashCommentsInAmbientDeclaration.ts] ////
//// [file0.ts]
/// <reference path="file1.ts" />
class C {
/// <reference path="file1.ts" />
public foo(x: string, y: any)
public foo(x: string, y: number) { }
}
//// [file1.ts]
var x = 10;
/// <reference path="file0.ts" />
declare var OData: any;
//// [file1.js]
var x = 10;

View File

@@ -1,8 +0,0 @@
=== tests/cases/compiler/file1.ts ===
var x = 10;
>x : Symbol(x, Decl(file1.ts, 0, 3))
/// <reference path="file0.ts" />
declare var OData: any;
>OData : Symbol(OData, Decl(file1.ts, 3, 11))

View File

@@ -0,0 +1,15 @@
//// [tests/cases/compiler/doNotEmitTripleSlashCommentsOnNotEmittedNode.ts] ////
//// [file0.ts]
/// <reference path="file1.ts" />
declare var OData: any;
//// [file1.ts]
/// <reference path="file0.ts" />
interface F { }
//// [file0.js]
//// [file1.js]

View File

@@ -0,0 +1,12 @@
=== tests/cases/compiler/file1.ts ===
/// <reference path="file0.ts" />
interface F { }
>F : Symbol(F, Decl(file1.ts, 0, 0))
=== tests/cases/compiler/file0.ts ===
/// <reference path="file1.ts" />
declare var OData: any;
>OData : Symbol(OData, Decl(file0.ts, 2, 11))

View File

@@ -1,9 +1,12 @@
=== tests/cases/compiler/file1.ts ===
var x = 10;
>x : number
>10 : number
/// <reference path="file0.ts" />
interface F { }
>F : F
=== tests/cases/compiler/file0.ts ===
/// <reference path="file1.ts" />
declare var OData: any;
>OData : any

View File

@@ -1,15 +0,0 @@
// @comments: false
// @Filename: file0.ts
/// <reference path="file1.ts" />
class C {
/// <reference path="file1.ts" />
public foo(x: string, y: any)
public foo(x: string, y: number) { }
}
// @Filename: file1.ts
var x = 10;
/// <reference path="file0.ts" />
declare var OData: any;

View File

@@ -0,0 +1,10 @@
// @comments: false
// @Filename: file0.ts
/// <reference path="file1.ts" />
declare var OData: any;
// @Filename: file1.ts
/// <reference path="file0.ts" />
interface F { }