Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
[Merge chakra-core/ChakraCore@1cadbb3b51] [1.6>1.7] [MERGE #3470 @tcare
Browse files Browse the repository at this point in the history
…] [Disabled Tests] test/Error/rlexe.xml: tests tagged
  • Loading branch information
chakrabot authored and kfarnung committed Aug 10, 2017
1 parent c9ffb2c commit c5c5b96
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 22 deletions.
7 changes: 6 additions & 1 deletion deps/chakrashim/core/bin/ch/WScriptJsrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1378,8 +1378,13 @@ bool WScriptJsrt::PrintException(LPCSTR fileName, JsErrorCode jsErrorCode)
if (errorCode != JsErrorCode::JsNoError || propertyType == JsUndefined)
{
const char *fName = fileName != nullptr ? fileName : "(unknown)";

CHAR shortFileName[_MAX_PATH];
CHAR ext[_MAX_EXT];
_splitpath_s(fName, nullptr, 0, nullptr, 0, shortFileName, _countof(shortFileName), ext, _countof(ext));

// do not mix char/wchar. print them separately
fprintf(stderr, "thrown at %s:\n^\n", fName);
fprintf(stderr, "thrown at %s%s:\n^\n", shortFileName, ext);
fwprintf(stderr, _u("%ls\n"), errorMessage.GetWideString());
}
else
Expand Down
18 changes: 11 additions & 7 deletions deps/chakrashim/core/test/Error/rlexe.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,49 +62,53 @@
<default>
<files>sourceInfo_00.js</files>
<baseline>sourceInfo_00.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
</default>
</test>
<test>
<default>
<files>sourceInfo_01.js</files>
<baseline>sourceInfo_01.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
<tags>exclude_jshost</tags>
</default>
</test>
<test>
<default>
<files>sourceInfo_10.js</files>
<baseline>sourceInfo_10.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
</default>
</test>
<test>
<default>
<files>sourceInfo_11.js</files>
<baseline>sourceInfo_11.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
<tags>exclude_jshost</tags>
</default>
</test>
<test>
<default>
<files>sourceInfo_12.js</files>
<baseline>sourceInfo_12.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
</default>
</test>
<test>
<default>
<files>sourceInfo_13.js</files>
<baseline>sourceInfo_13.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
<tags>exclude_jshost</tags>
</default>
</test>
<test>
<default>
<files>sourceInfo_20.js</files>
<baseline>sourceInfo_20.baseline</baseline>
<tags>fail</tags>
<compile-flags>-ExtendedErrorStackForTestHost</compile-flags>
<tags>exclude_jshost</tags>
</default>
</test>
<test>
Expand Down
3 changes: 2 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_00.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sourceInfo_00.js(9, 1) JavaScript runtime error: Object doesn't support this property or method
ReferenceError: 'nosuchfunc' is not defined
at Global code (sourceInfo_00.js:14:1)
2 changes: 1 addition & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_00.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ function dummy() {
}

dummy();
nosuchfunc(); //9,1
nosuchfunc();
dummy();
4 changes: 3 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_01.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
sourceInfo_01.js(9, 3) JavaScript runtime error: Exception thrown and not caught
thrown at sourceInfo_01.js:
^
123
2 changes: 1 addition & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_01.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ function dummy() {
}

dummy();
throw 123; //9,3
throw 123;
dummy();
3 changes: 2 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_10.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sourceInfo_10.js(10, 3) JavaScript runtime error: Object doesn't support this property or method
TypeError: Object doesn't support property or method 'nosuchfunc'
at Global code (sourceInfo_10.js:15:3)
2 changes: 1 addition & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_10.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ function dummy() {

dummy();
var obj = {};
obj.nosuchfunc(); //10,3
obj.nosuchfunc();
dummy();
4 changes: 3 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_11.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
sourceInfo_11.js(12, 9) JavaScript runtime error: Exception thrown and not caught
thrown at sourceInfo_11.js:
^
123
2 changes: 1 addition & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_11.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dummy();
var obj = {
func: function () {
dummy();
throw 123; //12,9
throw 123;
dummy();
}
};
Expand Down
3 changes: 2 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_12.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sourceInfo_12.js(12, 1) JavaScript runtime error: Function expected
TypeError: Function.prototype.apply: 'this' is not a Function object
at Global code (sourceInfo_12.js:17:1)
2 changes: 1 addition & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_12.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ dummy();
var obj = {
apply: Function.prototype.apply
};
obj.apply(); //12,1
obj.apply();
dummy();
4 changes: 3 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_13.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
sourceInfo_13.js(12, 9) JavaScript runtime error: Exception thrown and not caught
thrown at sourceInfo_13.js:
^
123
4 changes: 2 additions & 2 deletions deps/chakrashim/core/test/Error/sourceInfo_13.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ dummy();
var obj = {
get foo() { // This needs -Version:3
dummy();
throw 123; //12,9
throw 123;
dummy();
}
};
obj.foo; //12,1
obj.foo;
dummy();
4 changes: 3 additions & 1 deletion deps/chakrashim/core/test/Error/sourceInfo_20.baseline
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
sourceInfo_20.js(10, 5) JavaScript runtime error: Exception thrown and not caught
thrown at sourceInfo_20.js:
^
123

0 comments on commit c5c5b96

Please sign in to comment.