Skip to content

Commit

Permalink
Merge pull request #114 from bloomberg/isolated-declarations-missing-…
Browse files Browse the repository at this point in the history
…test

Isolated declarations missing test
  • Loading branch information
dragomirtitian authored Nov 27, 2023
2 parents 2dfc9d1 + b7d062a commit 867e100
Show file tree
Hide file tree
Showing 659 changed files with 47,794 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export function createLocalInferenceResolver({
return {
flags: accessorType.flags,
type: factory.createPropertySignature(
setAccessor ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [],
setAccessor === undefined ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [],
name,
/*questionToken*/ undefined,
accessorType.typeNode,
Expand Down
4 changes: 3 additions & 1 deletion src/harness/harnessIO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ export namespace Compiler {
file.locals = undefined;
dts.set(declarationPath, new documents.TextDocument(declarationPath, options.emitBOM ? Utils.addUTF8ByteOrderMark(declaration) : declaration));
if (declarationMapPath && declarationMap) {
dtsMap.set(declarationMapPath, new documents.TextDocument(declarationMapPath, options.emitBOM ? Utils.addUTF8ByteOrderMark(declarationMap) : declarationMap));
dtsMap.set(declarationMapPath, new documents.TextDocument(declarationMapPath, declarationMap));
}
diagnostics.push(...fileDiagnostics);
});
Expand Down Expand Up @@ -1170,6 +1170,8 @@ export namespace Compiler {
) {
let code = "";
code += "//// [" + header + "] ////\r\n\r\n";
code += "\r\n\r\n/// [Declarations] ////\r\n\r\n";
code += declarationContent(declarationFiles, tsSources, []);
code += "\r\n\r\n/// [Declarations Maps] ////\r\n\r\n";
code += declarationSourceMapContent(declarationFiles, declarationMapFiles, tsSources);

Expand Down
4 changes: 3 additions & 1 deletion src/testRunner/compilerRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,14 @@ class IsolatedDeclarationTest extends CompilerTestBase {
this.dteDtsFiles = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => f.asTestFile())];
this.dteDtsFiles.sort(fileCompare);
this.dteDtsMapFiles = [...ts.mapDefinedIterator(dteResult.dtsMap, ([, f]) => f.asTestFile())];
this.dteDtsMapFiles.sort(fileCompare);

// With force get JSON definition files we need to ignore
this.tscDtsFiles = [...ts.mapDefinedIterator(tscResult.dts, ([name, f]) => name.endsWith(".d.json.ts") ? undefined : f.asTestFile())];

this.tscDtsFiles.sort(fileCompare);
this.tscDtsMapFiles = ts.mapDefined(this.tscDtsFiles, f => tscResult.maps.get(f.unitName + ".map")?.asTestFile());
this.tscDtsMapFiles.sort(fileCompare);

const tscDiagnostics = ts.sortAndDeduplicateDiagnostics(this.result.diagnostics);
this.tscNonIsolatedDeclarationsErrors = tscDiagnostics.filter(d => !IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code));
Expand Down Expand Up @@ -686,7 +688,7 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest {
const existingTransformedTest = IO.readFile(autoFixCacheTest);
const hash = ts.sys.createHash!(env.testCaseContent.sourceCode);
const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName);
let transformSucceeded = false;
let transformSucceeded = true;
let hasReferenceDirectiveErrors = false;
if (fixedTest && fixedTest.settings.hash === hash) {
transformSucceeded = fixedTest.settings.succeeded !== "false";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// [[Reason: Semantically invalid. TSC does not emit .d.ts]] ////

//// [tests/cases/compiler/accessorDeclarationEmitVisibilityErrors.ts] ////

===================================================================
--- TSC declarations
+++ DTE declarations
@@ -1,5 +1,11 @@

+
+//// [accessorDeclarationEmitVisibilityErrors.d.ts]
+export declare class Q {
+ set bet(arg: DoesNotExist);
+}
+//# sourceMappingURL=accessorDeclarationEmitVisibilityErrors.d.ts.map
/// [Errors] ////

accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS2304: Cannot find name 'DoesNotExist'.
accessorDeclarationEmitVisibilityErrors.ts(2,18): error TS4106: Parameter 'arg' of accessor has or is using private name 'DoesNotExist'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// [[Reason: TODO: Printing differences. Seems avoidable.]] ////

//// [tests/cases/compiler/ambientConstLiterals.ts] ////

===================================================================
--- TSC declarations
+++ DTE declarations
@@ -15,9 +15,9 @@
declare const c5: 123;
declare const c6: -123;
declare const c7 = true;
declare const c8: E.A;
-declare const c8b = E["non identifier"];
+declare const c8b: (typeof E)["non identifier"];
declare const c9: {
x: string;
};
declare const c10: number[];
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
===================================================================
--- TSC declarations
+++ DTE declarations
@@ -1,11 +1,24 @@
@@ -1,11 +1,23 @@

+
+//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts]
Expand All @@ -18,7 +18,6 @@
+declare function flat<A, D extends number = 1>(arr: A, depth?: D): BadFlatArray<A, D>[];
+declare function foo<T>(arr: T[], depth: number): invalid;
+//# sourceMappingURL=arrayFakeFlatNoCrashInferenceDeclarations.d.ts.map
+
/// [Errors] ////

arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS5088: The inferred type of 'foo' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary.
Expand All @@ -31,7 +30,7 @@
"done": Arr,
"recur": Arr extends ReadonlyArray<infer InnerArr>
? BadFlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
@@ -19,6 +32,8 @@
@@ -19,6 +31,8 @@

function foo<T>(arr: T[], depth: number) {
~~~
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// [[Reason: Sourcemap is more detailed]] ////

//// [tests/cases/compiler/coAndContraVariantInferences.ts] ////

===================================================================
--- TSC declarations
+++ DTE declarations
@@ -1,6 +1,6 @@

//// [coAndContraVariantInferences.d.ts.map]
-{"version":3,"file":"coAndContraVariantInferences.d.ts","sourceRoot":"","sources":["coAndContraV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b24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// [[Reason: Printing differences]] ////

//// [tests/cases/compiler/commentsFunction.ts] ////

===================================================================
--- TSC declarations
+++ DTE declarations
@@ -9,11 +9,11 @@
b: number): void;
/** fooFunc
* comment
*/
-declare var fooFunc: (b: string) => string;
-declare var lambdaFoo: (a: number, b: number) => number;
-declare var lambddaNoVarComment: (a: number, b: number) => number;
+declare var fooFunc: (/** fooFunctionValue param */ b: string) => string;
+declare var lambdaFoo: (/**param a*/ a: number, /**param b*/ b: number) => number;
+declare var lambddaNoVarComment: (/**param a*/ a: number, /**param b*/ b: number) => number;
declare function blah(a: string): void;
declare function blah2(a: string): void;
declare function blah3(a: string): void;
declare function blah4(/*1*/ a: string, /*3*/ b: string): void;
Loading

0 comments on commit 867e100

Please sign in to comment.