mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Fix runtests for unittests
This commit is contained in:
parent
a1e69b0dc2
commit
30fe3f7221
8
Jakefile
8
Jakefile
@ -10,6 +10,7 @@ var servicesDirectory = "src/services/";
|
||||
var harnessDirectory = "src/harness/";
|
||||
var libraryDirectory = "src/lib/";
|
||||
var scriptsDirectory = "scripts/";
|
||||
var unittestsDirectory = "tests/cases/unittests/";
|
||||
var docDirectory = "doc/";
|
||||
|
||||
var builtDirectory = "built/";
|
||||
@ -74,13 +75,16 @@ var harnessSources = [
|
||||
"typeWriter.ts",
|
||||
"fourslashRunner.ts",
|
||||
"projectsRunner.ts",
|
||||
"unittestrunner.ts",
|
||||
"loggedIO.ts",
|
||||
"rwcRunner.ts",
|
||||
"runner.ts"
|
||||
].map(function (f) {
|
||||
return path.join(harnessDirectory, f);
|
||||
});
|
||||
}).concat([
|
||||
"services/colorization.ts"
|
||||
].map(function (f) {
|
||||
return path.join(unittestsDirectory, f);
|
||||
}));
|
||||
|
||||
var librarySourceMap = [
|
||||
{ target: "lib.core.d.ts", sources: ["core.d.ts"] },
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
interface Classification {
|
||||
/// <reference path="..\..\..\..\src\harness\external\mocha.d.ts" />
|
||||
/// <reference path="..\..\..\..\src\harness\harnessLanguageService.ts" />
|
||||
|
||||
interface Classification {
|
||||
position: number;
|
||||
length: number;
|
||||
class: ts.TokenClass;
|
||||
@ -66,7 +69,7 @@ describe('Colorization', function () {
|
||||
function numberLiteral(text: string) { return { value: text, class: ts.TokenClass.NumberLiteral }; }
|
||||
function stringLiteral(text: string) { return { value: text, class: ts.TokenClass.StringLiteral }; }
|
||||
function regExpLiteral(text: string) { return { value: text, class: ts.TokenClass.RegExpLiteral }; }
|
||||
function finalEndOfLineState(value: number) { return { value: value, class: undefined }; }
|
||||
function finalEndOfLineState(value: number) { return { value: value, class: <ts.TokenClass>undefined }; }
|
||||
|
||||
function test(text: string, initialEndOfLineState: ts.EndOfLineState, ...expectedEntries: ClassificationEntry[]): void {
|
||||
var result = getClassifications(text, initialEndOfLineState);
|
||||
@ -265,7 +268,7 @@ describe('Colorization', function () {
|
||||
identifier("Foo"),
|
||||
operator("<"),
|
||||
identifier("Foo"),
|
||||
operator(">"
|
||||
operator(">"),
|
||||
identifier("keyword"),
|
||||
finalEndOfLineState(ts.EndOfLineState.Start));
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user