michael@0: // Any copyright is dedicated to the Public Domain. michael@0: // http://creativecommons.org/licenses/publicdomain/ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 582643; michael@0: var summary = "'0x' not followed by hex digits should be a syntax error"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: try michael@0: { michael@0: eval("0x"); michael@0: throw new Error("didn't throw parsing 0x (with no subsequent hex digits)"); michael@0: } michael@0: catch (e) michael@0: { michael@0: assertEq(e instanceof SyntaxError, true, michael@0: "bad exception thrown: " + e); michael@0: } michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");