test/script/basic/NASHORN-837.js

changeset 144
4be452026847
parent 13
d8e4d66f1a06
child 952
6d5471a497fb
child 962
ac62e33a99b0
     1.1 --- a/test/script/basic/NASHORN-837.js	Tue Mar 19 11:03:24 2013 -0300
     1.2 +++ b/test/script/basic/NASHORN-837.js	Sat Mar 23 00:58:39 2013 +0100
     1.3 @@ -28,23 +28,13 @@
     1.4   * @run
     1.5   */
     1.6  
     1.7 -var failed = false;
     1.8 -
     1.9  try {
    1.10 -    try {
    1.11 -	throw new TypeError('error');
    1.12 -    } catch (iox) {
    1.13 -	function f() {
    1.14 -	    print(iox.message);
    1.15 -	}
    1.16 +    throw new TypeError('error');
    1.17 +} catch (iox) {
    1.18 +    var f = function() {
    1.19 +        if(iox.message != 'error') {
    1.20 +            print("Failure! iox did not throw correct exception");
    1.21 +        }
    1.22      }
    1.23 -    f();
    1.24 -} catch (e) {
    1.25 -    failed = (e instanceof ReferenceError);
    1.26 -    //iox not defined should be thrown
    1.27  }
    1.28 -
    1.29 -if (!failed) {
    1.30 -    print("Failure! iox did not throw correct exception");
    1.31 -}
    1.32 -
    1.33 +f();

mercurial