From f9de6783b9ca80bca8d0c5275d3afe5331287f3a Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Sat, 13 May 2017 20:51:54 -0700 Subject: [PATCH] closes #380: fix toSource() tests --- js/src/tests/js1_5/extensions/regress-336409-1.js | 5 ++--- js/src/tests/js1_5/extensions/regress-336410-1.js | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/js/src/tests/js1_5/extensions/regress-336409-1.js b/js/src/tests/js1_5/extensions/regress-336409-1.js index 32dbb3633..929868117 100644 --- a/js/src/tests/js1_5/extensions/regress-336409-1.js +++ b/js/src/tests/js1_5/extensions/regress-336409-1.js @@ -8,7 +8,7 @@ var BUGNUMBER = 336409; var summary = 'Integer overflow in js_obj_toSource'; var actual = 'No Crash'; -var expect = 'No Crash'; +var expect = /(No Crash|InternalError: allocation size overflow|out of memory)/; printBugNumber(BUGNUMBER); printStatus (summary); @@ -42,9 +42,8 @@ try } catch(ex) { - expect = 'InternalError: allocation size overflow'; actual = ex + ''; print(actual); } -reportCompare(expect, actual, summary); +reportMatch(expect, actual, summary); diff --git a/js/src/tests/js1_5/extensions/regress-336410-1.js b/js/src/tests/js1_5/extensions/regress-336410-1.js index 3116694e8..be4afe807 100644 --- a/js/src/tests/js1_5/extensions/regress-336410-1.js +++ b/js/src/tests/js1_5/extensions/regress-336410-1.js @@ -8,7 +8,7 @@ var BUGNUMBER = 336410; var summary = 'Integer overflow in array_toSource'; var actual = 'No Crash'; -var expect = 'No Crash'; +var expect = /(No Crash|InternalError: allocation size overflow|out of memory)/; printBugNumber(BUGNUMBER); printStatus (summary); @@ -42,10 +42,8 @@ try } catch(ex) { - //expect = '\(InternalError: allocation size overflow|out of memory\)'; - expect = 'InternalError: allocation size overflow'; actual = ex + ''; print(actual); } -reportCompare(expect, actual, summary); +reportMatch(expect, actual, summary);