-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Update rwc and test262 runner #1894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ff11ca9
59cb93a
e5be1c4
fddcc7d
c8ec147
6cbc8de
2e73d45
78efa97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1569,21 +1569,32 @@ module Harness { | |
export interface BaselineOptions { | ||
LineEndingSensitive?: boolean; | ||
Subfolder?: string; | ||
Baselinefolder?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are these capitalized? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just try to keep with the style |
||
} | ||
|
||
export function localPath(fileName: string, subfolder?: string) { | ||
return baselinePath(fileName, 'local', subfolder); | ||
export function localPath(fileName: string, baselineFolder?: string, subfolder?: string) { | ||
if (baselineFolder === undefined) { | ||
return baselinePath(fileName, 'local', 'tests/baselines', subfolder); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just always take the baselineFolder and just have each runner pass in the right thing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compiler Runner/project runner/ fourslash runner don't need that. |
||
} | ||
else { | ||
return baselinePath(fileName, 'local', baselineFolder, subfolder); | ||
} | ||
} | ||
|
||
function referencePath(fileName: string, subfolder?: string) { | ||
return baselinePath(fileName, 'reference', subfolder); | ||
function referencePath(fileName: string, baselineFolder?: string, subfolder?: string) { | ||
if (baselineFolder === undefined) { | ||
return baselinePath(fileName, 'reference', 'tests/baselines', subfolder); | ||
} | ||
else { | ||
return baselinePath(fileName, 'reference', baselineFolder, subfolder); | ||
} | ||
} | ||
|
||
function baselinePath(fileName: string, type: string, subfolder?: string) { | ||
function baselinePath(fileName: string, type: string, baselineFolder: string, subfolder?: string) { | ||
if (subfolder !== undefined) { | ||
return Harness.userSpecifiedroot + 'tests/baselines/' + subfolder + '/' + type + '/' + fileName; | ||
return Harness.userSpecifiedroot + baselineFolder + '/' + subfolder + '/' + type + '/' + fileName; | ||
} else { | ||
return Harness.userSpecifiedroot + 'tests/baselines/' + type + '/' + fileName; | ||
return Harness.userSpecifiedroot + baselineFolder + '/' + type + '/' + fileName; | ||
} | ||
} | ||
|
||
|
@@ -1637,7 +1648,7 @@ module Harness { | |
return; | ||
} | ||
|
||
var refFilename = referencePath(relativeFilename, opts && opts.Subfolder); | ||
var refFilename = referencePath(relativeFilename, opts && opts.Baselinefolder, opts && opts.Subfolder); | ||
|
||
if (actual === null) { | ||
actual = '<no content>'; | ||
|
@@ -1675,7 +1686,7 @@ module Harness { | |
opts?: BaselineOptions): void { | ||
|
||
var actual = <string>undefined; | ||
var actualFilename = localPath(relativeFilename, opts && opts.Subfolder); | ||
var actualFilename = localPath(relativeFilename, opts && opts.Baselinefolder, opts && opts.Subfolder); | ||
|
||
if (runImmediately) { | ||
actual = generateActual(actualFilename, generateContent); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent